Advertisement
Guest User

student body

a guest
Jan 17th, 2015
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. class Student {
  2.     private String firstName;
  3.     private String lastName;
  4.     private int age;
  5.    
  6.     public Student (String last, String first, int studentage) {
  7.         lastName = last;
  8.         firstName = first;
  9.         age = studentage;
  10.     }
  11.    
  12.     public String getLast() {
  13.         return lastName;
  14.     }
  15.    
  16.     public String getFirst() {
  17.         return firstName;
  18.     }
  19.    
  20.     public int getAge() {
  21.         return age;
  22.     }
  23. }
  24.  
  25. public class StudentBody {
  26.     public static void main() {
  27.         Student[] students = new Student [10];
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement