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 / anjani

when we create the arraylist, we have two factors
1- inital size of array list,
2 - load factor (default is .75).

load factor means size of the arraylist will be doubled if
we fill 75% of the size availabe.

i mean if intial size of arraylist is 100 then when we will
insert 75th element in the arraylist, its size will be doubled.

Is This Answer Correct ?    13 Yes 19 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does localhost mean?

702


What happens when heap memory is full?

742


Can we sort a map in java?

761


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?

822


How do you add an arraylist to an array in java?

726


What is integer parseint?

725


What is meant by design patterns?

790


What are implicit objects in java?

750


Difference between this() and super() in java ?

812


What is "this" keyword in java? Explain

871


Can you access the private method from outside the class?

733


What do you mean by JVM?

797


What is a void method java?

723


Difference between class#getinstance() and new operator ?

883


Define inheritance?

783