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
How can I debug the Java security exceptions and AccessControlExceptions?
What are the characteristics of java?
What is java ceil?
How to sort an array in java without using sort method?
Program to Find the second largest element in an array.
Name the components that are termed to be Heavy-weight component but available in Light-weight components?
What is hashing in java?
How to convert string to char and vice versa?
What is string substring?
What are the different data types in java?
Explain about the main() method in java?
What are the uses of synchronized keyword?
What is the requirement of thread in java?
Is java a prime method?
What are jee technologies?