Main difference between Java List and ArrayList is that List is an interface while ArrayList is a class.

ArrayList implements the List interface, which means that ArrayList is a subtype of List interface.

In Java or any object oriented language, super type of variable can store an object of subtype. This is known as Polymorphism because any virtual method will be executed from subclass only, even though they were called from super type.

Featured Post

NGINX Unit is dynamically configured using a REST API

There is no static configuration file. All configuration changes happen directly in memory. Configuration changes take effect without requir...