| Author |
comparison of List & ArrayList
|
k sabeerdeen
Greenhorn
Joined: Mar 11, 2010
Posts: 12
|
|
hi experts,
what is the difference between the two :
List list= new ArrayList();
ArrayList list = new ArrayList();
thanks in advace!
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2927
|
|
It is something called Coding to the interface.
With the first- We could assign instances of anything which implements List- ArrayList, LinkedList, Vector to the list reference
In the second case- We can assign instances of ArrayList only.
|
Mohamed Sanaulla | My Blog
|
 |
 |
|
|
subject: comparison of List & ArrayList
|
|
|