To test whether two objects are equal, a developer should provide an
equals method. The logic in the method can determine if the two objects are equal and return true, or return false otherwise. To compare two objects with the
equals method, follow these four steps.
mainmethod to test two circles for equality. Type in the following Java statements.
equalsmethod, two circles are equal if they have the same radius.
equalsmethod correctly determined
circle1is equal to
circle2. As an exercise, change
ifstatement to test circles that are not equal.