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
Can singleton class be serialized?
Can we force garbage collector to run ?
Can we execute a program without main() method?
How many ways can an argument be passed to a subroutine and explain them?
How an object is serialized in java?
what is the difference between thread and runnable types? : Java thread
String class is defined under which package in java?
What is the main use of generics in java?
What is string data?
What is generic type?
Why hashset is used in java?
Can we extend immutable class?
Where and how can you use a private constructor?
How to check if linked list contains loop in java?
Can an anonymous class be declared as implementing an interface and extending a class in java programming?