instanceof

The instanceof keyword is used as an operator that returns true if an object on its left side is an instance of the class specified on its right side. The instanceof operator will also return true when comparison is done with an object implementing an interface. The instanceof operator returns false if the object is not an instance of the specified class or does not implement the specified interface. It also returns false if the specified object is null.