Skip to main content

List l = new ArrayList()

1 reply [Last post]
arfatkhan
Offline
Joined: 2007-12-13
Points: 0

Please tell me what is diffence between these two statements.Which is advantageous way of creating arrayList and Why?

List l = new ArrayList();
ArrayList l = new ArrayList();

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
zeeshanjeelani
Offline
Joined: 2007-11-30
Points: 0

The first one method is the right one because
First one will give your more flexibility and grip over code.