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; }

class Person { string Name { get; set; } int Age { get; set; } public Person(string name, int age){ this.Name = name; this.Age = age; } Person(Person p): this(p.Name, p.Age){ } }

Questions about programming?Chat with your personal AI assistant