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 Enum in Java?
What is exception in java?
Is string is a data type?
What does microservices mean?
What are functions in java?
What are autoboxing and unboxing? When does it occur?
What is a parameter in java?
Is alive method in java?
Why main function is static?
What is the right data type to represent a price in java?
What is the importance of main method in Java?
What are the two ways to create a thread?
Where can i get Latest SUN Certification Dumps and what are the Sun Certification Codes that are available, Im new to JAVA, so please gimme info as i need to write J2EE - Core Java Certification
Name some classes present in java.util.regex package.
Explain the difference between hashmap and hashtable in java?