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.


Popular posts from this blog

Check MySQL query history from command line

Installing chocolatey on Windows

Fixed: ImportError: No module named