That statement means that you can use all of the features of List
that are implemented using ArrayList
but you could also use the features inside LinkedList
. Although there is no harm if you have the object type as ArrayList
, it could be useful for example, if you have a method that takes in a List
parameter instead of an ArrayList
, your choices have expanded and you can have other classes that implement that type, e.g LinkedList
.
To put it simply, if you are using the interface List
as its type, you are saying: "I want to use any class that does these things to do my own" as List
is an interface. But if you just use ArrayList
, you are saying: "I want to use just this specific class to to my things". In summary, it gives you more flexibility.
Other than that, there isn't much of a difference using the super class as the type or using ArrayList
or other subclass as itself.
Hope that this is what you are asking about, and hope that it makes sense. If not, feel free to ask any questions.