I'm going to say what Ganeprog said differently:
The equals() method is used to determine whether one object is equivalent to another object, as in:
this.equals( that );
where 'this' and 'that' are two objects. equals() will return true if 'this' and 'that' are of the same type and have the same attributes, false otherwise. The Object class includes an equals() method, and since all Java classes descend from Object, all Java classes have an equals() method. However, the equals() method provided by the Object class may not give the desired results for every Java class, so it is the programmer's responsibility to override Object.equals() as needed. Writing a good and proper equals() method is a good study topic if you get bored and need something to do.
Primitives (int, double, char, etc.) are not objects so cannot use a method following the dot, '.', operator like .equals() as objects can. We use and treat Strings as primitives so often that we forget they are objects, and we're surprised and disappointed when a String object rudely reminds us of that fact by not "acting" as we'd hoped it would.
Keep coding.