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
When should I use singleton pattern?
What are the core java topics?
Explain heap sort?
What is the difference between keyword and identifier?
Which sorting is best in java?
What is map in java?
What are autoboxing and unboxing? When does it occur?
Tell us something about an iterator.
why Interface used?
What is use of static in java?
What is a singleton class? Give a practical example of its usage.
What is difference between iterator and enumeration in java?
What are the main features of java?
What are static variables and functions?
What is a variable declaration?