instanceof
VM keeps track of Run-time Type Information (RTTI)
boolean operator to query type of object
can also use the getClass() method
- method defined in Object
- returns java.lang.Class
System.out.println(d instanceof Dog); // true
System.out.println(d instanceof Animal); // true
System.out.println(c instanceof Dog); // false
System.out.println(c instanceof Object); // true