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
Is static variable stored in heap?
How do you escape in java?
What are the access modifiers in java?
What are autoboxing and unboxing? When does it occur?
Explain covariant method overriding in java.
How do you declare a string variable?
Explain the difference between runnable and callable interface in java?
how can i use a nonsynchronized hashtable?
What is the abstract class?
Why do we need singleton?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
What are the differences between abstract class and interface?
What is an association?
What does 0 mean in boolean?
why Interface used?