You can use it to test if an object is an instance of a class, an instance of a subclass, or an instance of a class that implements a particular interface. Example: “Hello” instanceof String would return true while new Integer(5) instanceof String would return false .18 Şub 2012