Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. import java.io.Serializable;
  2.  
  3. public class Person implements Serializable {
  4.  
  5. private String firstName;
  6. private String lastName;
  7. private int age;
  8.  
  9.  
  10. public Person(String firstName, String lastName, int age) {
  11. this.firstName = firstName;
  12. this.lastName = lastName;
  13. this.age = age;
  14. }
  15.  
  16.  
  17. public String getFirstName() {
  18. return firstName;
  19. }
  20.  
  21. public void setFirstName(String firstName) {
  22. this.firstName = firstName;
  23. }
  24.  
  25. public String getLastName() {
  26. return lastName;
  27. }
  28.  
  29. public void setLastName(String lastName) {
  30. this.lastName = lastName;
  31. }
  32.  
  33. public int getAge() {
  34. return age;
  35. }
  36.  
  37. public void setAge(int age) {
  38. this.age = age;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement