Advertisement
Strade351

Task 4.2.7-8

Jul 8th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. /**
  2.  * Created by Anatoliy on 09.07.2016.
  3.  * Task 4.2.7-8
  4.  */
  5.  
  6. public class Person {
  7.  
  8.     private String name;
  9.     private int age;
  10.  
  11.     public Person(String name, int age) {
  12.         this.name = name;
  13.         this.age = age;
  14.     }
  15.  
  16.     public String getName() {
  17.         return this.name;
  18.     }
  19.  
  20.     public int getAge() {
  21.         return this.age;
  22.     }
  23.  
  24.     public void setAge(int x) {
  25.         this.age = x;
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement