In Java, the instanceof keyword is a binary operator. It is used to check whether an object is an instance of a particular class or not. The operator also checks whether an object is an instance of a class that implements an interface.
The syntax of the instanceof is:
The left operand of the instanceof operator is the object name and the right operand is the class name. The result will be true if an object is an instance of a class and false if it is not.