The instanceof operator in Java is used to check whether an object is an instance of a particular class or not . objectName instanceOf className; Here, if objectName is an instance of className , the operator returns true .
The instanceof operator in Java is used to check whether an object is an instance of a particular class or not . objectName instanceOf className; Here, if objectName is an instance of className , the operator returns true .