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

Why main function is static?

770


What are keywords give examples?

665


What are the types of inner classes (non-static nested class) used in java?

667


What does %4d mean in java?

1014


Give the difference between the println method and sqrt method?

714






Define a java class.

925


What is static import in java?

614


Is there any sort function in java?

700


What is this keyword in java?

667


Is string is a data type in java?

685


What is difference between static class and singleton pattern?

561


What is the epoch date?

659


What is a marker interface?

667


What things should be kept in mind while creating your own exceptions in java?

733


List the three steps for creating an object for a class?

592