1. Other
  2. Other
  3. 1 to compare two objects in a classa use the...

Question: 1 to compare two objects in a classa use the...

Question details

1. To compare two objects in a class:

A) use the == operator, e.g. object1 == object2

B) write a method to do a byte-by-byte compare of the two objects

C) write an equals method that will make a field by field compare of the two objects

D) Since objects consist of several fields, you cannot compare them

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution