| Author |
generics 1.4
|
rohit kumar
Greenhorn
Joined: May 27, 2007
Posts: 9
|
|
I am getting a runtime error. PLs help
|
 |
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
|
|
|
When you create a List using asList, the size is fixed.
|
 |
Burkhard Hassel
Ranch Hand
Joined: Aug 25, 2006
Posts: 1274
|
|
That's because the list is backed by the array, and arrays can't change their size. But you could make a copy of the list returned by the asList method using List ints = new ArrayList( Arrays.asList(new Integer[] {new Integer(1), new Integer(2), new Integer(3)}) ); Then you'll have your six and ten. By the way, wouldn't be "The Six and Ten" a nice name for a pub? Bu.
|
all events occur in real time
|
 |
 |
|
|
subject: generics 1.4
|
|
|