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

Is static variable stored in heap?

921


How do you escape in java?

1002


What are the access modifiers in java?

978


What are autoboxing and unboxing? When does it occur?

890


Explain covariant method overriding in java.

1043


How do you declare a string variable?

955


Explain the difference between runnable and callable interface in java?

999


how can i use a nonsynchronized hashtable?

2525


What is the abstract class?

973


Why do we need singleton?

925


What is the exact difference in between Unicast and Multicast object? Where will it be used?

997


What are the differences between abstract class and interface?

985


What is an association?

938


What does 0 mean in boolean?

926


why Interface used?

942