In the first example List is the interface which defines the type of reference to the object list and ArrayList is the implementation of the interface which is the type of the actual object.
In the second example, both object and its reference have type ArrayList