SubTypes.java further illustrates how you must keep the reference variable parameter type and object parameter type the EXACT same when declaring and instantiating a collection. It then shows how you can add subtypes to the collection subsequently and demonstrates how to use instanceof and class casting to use parent and child methods.