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
Where is java located?
State some situations where exceptions may arise in java?
How do you use substring in java?
What is a bufferedreader?
Explain what pure virtual function is?
What are the steps involved to create a bean?
Is java still relevant?
What is string buffer?
Is null an object in java?
What are register variables what are the advantages?
What are the different types of data structures in java?
How a string is stored in memory?
What is function declaration?
What is the difference between overriding and overloading in OOPS.
Can we increase size of array?