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 is the use of :: in java?
What is the maximum size of arraylist in java?
What is array size in java?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
Do I need java on my computer?
What is difference between public static and void?
does java support pointers?
What happens when heap memory is full?
What is the use of protected in java?
What is constructor in java ?
Describe the process as to how substring() methodology mechanisms in java.
What is java oops?
Can an arraylist be empty?
Differences between traditional programming language and object oriented programming language?
Differentiate jar and war files?