we use following ways to create a collection object. 1.List l1=new ArrayList(); 2.ArrayList al=new ArrayList(); 3.Collection c=new ArrayList(); Why we use the first one more often but not the remaining two?
This is a Java question, but you've posted it in our HTML and JavaScript forum -- so it's off-topic here. I'm going to move this over to our Java in General(Beginner) forum, where someone will answer it for you.