generate functionThu, 22 Dec 2022

add to this class a copy constructor class Person { private String name; private int age; public Person(string name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; }

public Person(Person person) { this.name = person.getName(); this.age = person.getAge(); }

Questions about programming?Chat with your personal AI assistant