The equals method of the Object class returns true only if the two objects being compared:_________
a) have identical attributes.
b) are the same object.
c) are aliases of each other.
d) are == to each other.
e) All of these are correct.

Respuesta :

Answer:

Option b) are the same object.

Explanation:

The equals is used to compare the two objects based on the equality of the objects and if they share the same memory address. Thus the same objects will return the same memory address in which case method requires true.

== and equals method are different in terms of comparison, identical attributes may not lead to the output being true.

ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE