aspose file tools
The moose likes Java in General and the fly likes Diffrence between declaring List lst = new ArrayList() and .. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Diffrence between declaring List lst = new ArrayList() and .." Watch "Diffrence between declaring List lst = new ArrayList() and .." New topic
Author

Diffrence between declaring List lst = new ArrayList() and ..

ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 196
HI
Want to know the diffence between

declaring
List lst = new ArrayList();
ArrayList = new ArrayList();

Which is good to use and why ?
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

The 1st one is preferred. Read this or this...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Dhan Kumar
Greenhorn

Joined: Aug 03, 2009
Posts: 22
List lst = new ArrayList();

ArrayList = new ArrayList();



Actually liked the links given by Ankit...thanks a lot.


Dhan
SCJP - Here for Knowledge..
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Diffrence between declaring List lst = new ArrayList() and ..
 
Similar Threads
List vs ArrayList
Lists
Difference between Interface reference and class reference
Merging Multiple Lists
Generics