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

remember.. there are 2 things involved.. capacity and size..
capacity represents how many max elements the list can
accomodate in it, size represents how many elements are
present currently in the list..the capacity is automatically
increased by certain amount (10, 20, 30..) based on the
current size once the size is equal to capacity..

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define how objects are stored in java?

994


Explain the significance of listiterator.

1026


Can we have more than one package statement in source file ?

965


What is computer compiler?

938


How to overcome the exception object reference not set to an instance of object?

1101


Does anyone still use java?

1056


What is the difference between abstraction and encapsulation?

1004


When do we use synchronized methods in java?

992


Is object a data type in java?

1051


What is api in java?

934


How many wrapper classes are there in java?

967


What is the difference between JDK and JVM?

1183


Why wait and notify methods are declared in object class?

977


What is the difference between assignment and initialization?

999


What is the primary benefit of encapsulation?

1014