Verify if an object belongs to a particular class.
public |
The instanceof keyword examines whether an object is an instance of a specific class or interface.
The instanceof keyword compares the instance with a type, yielding either true or false as the result.