compare class with object
Answers
Answered by
1
Answer:
In Java, the == operator compares that two references are identical or not. Whereas the equals() method compares two objects. Objects are equal when they have the same state (usually comparing variables). Objects are identical when they share the class identity.
Similar questions
Computer Science,
22 days ago
Math,
22 days ago
Math,
1 month ago
Chemistry,
1 month ago
English,
7 months ago
Social Sciences,
7 months ago