if arraylist size is increased from initial size what is
the size of arraylist...suppose initial is 100 , if i add
101 element what is the size...
Answer Posted / rajnish
The Size of the arraylist will become 101 only once you call suppose al.size() but it will calculate it's capacity like below:
New Capacity = (current capacity*3/2)+1
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Why do we need wrapper classes?
What is the advantage of OOP in java?
What is a qualifier in a sentence?
How do you control extraneous variables?
Can constructor be synchronized?
What means public static?
Define an applet in java?
What is final method?
How can we use primitive data types as objects?
What if static is removed from main method?
What is currentthread()?
What state does a thread enter when it terminates its processing in java programming?
What is array list in java?
Can a constructor be private and how are this() and super() method used with constructor?
What is size () in java?