Howmany number of objects we can store in an ArrayList. Is
there any limit?

Answer Posted / abdul

Array list size will increase dynamically.By default we can
store 16 objects.If number of objects increases the
arraylist size increase dynamically as below.
(2*Prevous size+2)
For ex: (2*16+2)=34 next time
(2*34+2)= 70

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does treeset allow null in java?

520


Why do we need strings in java?

536


What are namespaces in java?

531


What will happen if a thrown exception is not handled?

570


What is static block?

598






What is the protected method modifier?

572


What is nested class?

579


How is it possible in java programming for two string objects with identical values not to be equal under the == operator?

577


What does arrays sort do in java?

551


What is the use of using enum to declare a constant?

566


What are controls and their different types in awt?

612


Realized?

1670


Do you know why doesn't the java library use a randomized version of quicksort?

562


What is the size of a string in java?

555


What is flush () in java?

562