Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

from the Java Source code of ensureCapacity() API,

int newCapacity = (oldCapacity * 3)/2 + 1;

So, (100 *3)/2 + 1 will be the answer.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain jvm, jre, and jdk?

959


What is threaded programming and when is it used? : Java thread

1017


What is variable in java?

917


What is the purpose of declaring a variable as final?

918


What is an immutable object?

1038


What is defined as false sharing in the context of multithreading?

984


When do you get classcastexception?

977


What is the difference between array and array list in java?

1145


Why 1 is not a prime number?

981


When should the method invokelater() be used?

976


What is the multi-catch block in java?

999


What is bubble sort in java?

991


What is the significance of java packages?

1066


Differentiate between nested and inner class in java.

954


How an object is serialized in java?

934