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();
The first one method is the right one because
First one will give your more flexibility and grip over code.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.