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 / siri
remember.. there are 2 things involved.. capacity and size..
capacity represents how many max elements the list can
accomodate in it, size represents how many elements are
present currently in the list..the capacity is automatically
increased by certain amount (10, 20, 30..) based on the
current size once the size is equal to capacity..
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is string pooling concept?
What is empty list in java?
Explain what is encapsulation?
In how many ways we can do synchronization in java?
Why is it called boolean?
Explain the difference between hashmap and hashtable in java?
What is the nested interface?
How does a for loop work?
do I need to use synchronized on setvalue(int)? : Java thread
What is the final keyword denotes?
What is executor memory?
Give an example of use of pointers in java class.
Is set sorted in java?
Explain the difference between extends thread vs implements runnable in java?
Can you run java program without main method?