// create the ArrayList that can only contain Dogs.
ArrayList<Dog> dogs = new ArrayList<Dog>( 101 );

// add an element, will be implicitly checked to make sure it is a Dog
dogs.add( new Dog( "Bowser" ) );

// add an element, will be implicitly checked to make sure it is a Dog.
// Dalmatians counts as Dogs since they are a subclass.
dogs.add( new Dalmatian( "Spot" ) );

// fetch an element, will be implicity cast back to Dog, no (Dog) necessary
Dog aDog = dogs.get( 0 );