The operand on the left of the instanceof operator is an object , and the operand on the right is a class. When the object on the left is an object created by the class or subclass on the right, the result of this operator is true, otherwise it is false.
Example:
publicclassApplication{publicstaticvoidmain(String[]args){Objecto=newStudent();System.out.println(oinstanceofPerson);}}
The running results are as follows:
true