Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Person(String name, Int age){
- this.name = name;
- this.age = age;
- }
- public int getAge(){
- return age;
- }
- public String getname(){
- return name;
- }
- ------------------------------------------------------------------------
- Person person1 = new Person("Donya", 19);
- public Person Copy(person1){
- return new Person(new String(person1.getName), new Integer(person1.getAge));
- }
Add Comment
Please, Sign In to add comment