Aryan PrajapatKnowledge Contributor
Can you tell the difference between equals() method and equality operator (==) in Java?
Can you tell the difference between equals() method and equality operator (==) in Java?
Equality operator (==) is used to check the equality condition between two variables. But the equals() method is used to check the equality condition between two objects.