Difference between equals() and ==

Both equals() and == is used to check the equality of the objects but there is a significance amount of difference between equals() and ==. The equals method is present in the java.lang.Object class and it is used to check the equivalence of the object (ie) to check if the content is equal whereas == is used to check the actual object instances are same or not. [Read more…]