1 Dec 2008 at 11:55 #1 PaulStat PaulStat Soldato Joined 1 Mar 2003 Posts 5,508 Location Cotham, Bristol Ok so you setup a new ArrayList like so ArrayList list = new ArrayList(20); You then add 10 items to the list, leaving it half full. If I then do the following listSize = list.size(); What is listSize? Is it 10 or 20?
Ok so you setup a new ArrayList like so ArrayList list = new ArrayList(20); You then add 10 items to the list, leaving it half full. If I then do the following listSize = list.size(); What is listSize? Is it 10 or 20?
1 Dec 2008 at 13:32 #5 PaulStat PaulStat Soldato OP Joined 1 Mar 2003 Posts 5,508 Location Cotham, Bristol Dj_Jestar said: I didn't think it was necessary to specify a capacity for ArrayList's as they are self growing? Click to expand... Nope not necessary but still possible
Dj_Jestar said: I didn't think it was necessary to specify a capacity for ArrayList's as they are self growing? Click to expand... Nope not necessary but still possible