The equals method of java
Boolean class equals() method(Boolean class equals() method)
-
equals() method is available in java.lang package.
equals() method is available in the java.lang package.
-
equals() method is used to check equality or inequality of this Object against the given Object or in other words we can say this method is used to compare two objects.
The equals() method is used to check the equality or inequality of this object with the given object, in other words we can say that this method is used to compare two objects.
-
equals() method is a non-static method, it is accessible with the class object only and if we try to access the method with the class name then we will get an error .
The equals() method is a non-static method that can only be accessed through class objects, if you try to access the method using the class name, you will receive a to the error message.
-
equals() method does not throw a