aridokmecian

Untitled

Nov 4th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. public Person(String name, Int age){
  2.     this.name = name;
  3.     this.age = age;
  4. }
  5.  
  6. public int getAge(){
  7.     return age;
  8. }
  9. public String getname(){
  10.     return name;
  11. }
  12. ------------------------------------------------------------------------
  13. Person person1 = new Person("Donya", 19);
  14. public Person Copy(person1){
  15.     return new Person(new String(person1.getName), new Integer(person1.getAge));
  16. }
Add Comment
Please, Sign In to add comment