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 / satish
from the Java Source code of ensureCapacity() API,
int newCapacity = (oldCapacity * 3)/2 + 1;
So, (100 *3)/2 + 1 will be the answer.
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What do you mean by pointer value and address?
What is the benefit of abstract class?
How to perform linear search in java?
How does a for loop work?
What are the types of collections in java?
Explain static nested classes ?
Why declare Main() method as a static in java ?
Why hashcode is used in java?
What is difference between module and function?
Can one thread block the other thread?
What is pangram in java?
How do you classify Dialog Box?
Can an interface have a constructor?
How to provide security in java
What does nextint () do in java?