PPT Slide
Explanation of the typical equals( ) method:
1. The keyword ‘instanceof’ merely determines whether or not a reference is of a type of class.
String strExample = “Hello”;
if (strExample instanceof String)
System.out.print (“It’s a String!”);
We will cover this keyword in more detail later.
2. The steps taken to verify the
identity of two objects is inherently based
on their context. In the example, two boxes
were deemed identical if they had the same
dimensions. Other tests could have