Question: TEST3F17: Demonstrate how to overload the constructor for the Person class in the application by selecting the correct answer from the list. a) public Person(int

TEST3F17: Demonstrate how to overload the constructor for the Person class in the application by selecting the correct answer from the list.
| |||
1 public class Person[ private int age; public Person )I age5; haveBirthday () printPerson ); public void printPerson ) System.out.println (age "years old."); 10 11 public void setAge (int ag) f 12 13 14 15 16 17 public void haveBirthday) 18 19 20 1 public class PersonDemo f 2 3 4 age agi public int getAge) return age; age++i public static void main (String[] args) f Person p = new Person(); p.setAge (42) p.printPerson )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
