Testing if an Object can be Cast Using Instanceof
Java provides the instanceof operator to test if an object is of a certain type, or a subclass of that type. The program can then choose to cast or not
Java provides the instanceof operator to test if an object is of a certain type, or a subclass of that type. The program can then choose to cast or not