A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Dec 12, 2005
Jan 31, 2006 21:58:00
Does anybody knows ArrayList Maximum Size?
if i give ArrayList al=new ArrayList(Integer.MAX_VALUE);
then it is giving this exception:
java.lang.OutOfMemoryError: Requested array size exceeds VM limit
Joined: Sep 24, 2003
Jan 31, 2006 22:23:00
Integer.MAX_VALUE is the maximum size of an ArrayList.
You are encountering an exhaustion of heap space (a failed alloc by the VM).
You can simply give your VM more heap space using the -Xmx option when you start it up
Java Q&A (FAQ, Trivia)
I agree. Here's the link:
subject: ArrayList Size
please tell me
size of the list
default size of arraylist
how arraylist increases it size automatically?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014