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
why using interface interface ?
Which one of the following suits the description of a string better: derived or primitive?
What is the difference between variable declaration and variable initialization?
What is a generic type?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
What is the major drawback of internal iteration over external iteration?
What is difference between char array and string?
What do you mean by Function Overloading in java?
Compare Mutex and Semaphore in java.
Can we override static methods in java?
What is included in core java?
How is java created?
What is the difference between a checked and an unchecked exception?
Can java run on google chrome?
What is the public method modifier?