Answer:
The output is false if the Circle class in program 1 is used.
It has 2 overload methods :
equals(Circle circle) defined in the Circle class and equals(Object o) defined in the Object class, inherited by the Circle class.
At compile time, circle1.equals(circle2) is matched to equals(Object o), because the declared type for circle1 and circle2 is Object.
The output is true if the Circle class in program 2 is used.
The Circle class overrides the equals(Object o) method defined in the Object class.
At compile time, circle1.equals(circle2) is matched to equals(Object o) and at runtime the equals(Object o) method implemented in the Circle class is invoked.
Answer:
Program 1 displays false and Program 2 displays true
Step-by-step explanation: