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
Explain inner classes ?
Why can't you declare a class as protected?
Which class should you use to obtain design information about an object in java programming?
Explain the features of java?
How are this() and super() used with constructors in java programming?
Difference between abstract and concrete class ?
What does string intern() method do?
What are the different collection views provided by maps?
What is functional interface in java?
How to sort numbers in java without array?
What is bitwise complement?
How to display all the prime numbers between 1 and 100
Does java arraylist maintain insertion order?
What is meant by flickering?
What are the different ways of creating thread?