This is called programming to interface. This will be helpful in case if you wish to move to some other implementation of List in the future. If you want some methods in ArrayList
then you would need to program to the implementation that is ArrayList a = new ArrayList()
.