Results 1 to 3 of 3
Thread: A simple List question
- 02-16-2009, 03:24 AM #1
Member
- Join Date
- Feb 2009
- Posts
- 25
- Rep Power
- 0
-
Yes. It constructs a new ArrayList which is also a List.
-
List is an interface and can't be constructed directly. ArrayList is a class that implements the List interface. By coding this way, if you later decide that you would prefer to use a LinkedList instead of an ArrayList, you only have to change minimal code. The variable still remains a List and none of the uses of the variable change.
Similar Threads
-
Super simple question
By jigglywiggly in forum New To JavaReplies: 3Last Post: 01-26-2009, 01:17 AM -
Linked List Question
By CirKuT in forum New To JavaReplies: 4Last Post: 12-10-2008, 06:56 PM -
Simple append question
By Rageagainst20 in forum New To JavaReplies: 0Last Post: 12-20-2007, 11:40 PM -
Probably a really simple question...
By ibanez270dx in forum New To JavaReplies: 0Last Post: 11-16-2007, 01:27 AM -
Simple question of JTable
By carl in forum AWT / SwingReplies: 1Last Post: 08-07-2007, 07:07 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks