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

What is string pooling concept?

1074


What is empty list in java?

1073


Explain what is encapsulation?

1083


In how many ways we can do synchronization in java?

968


Why is it called boolean?

1005


Explain the difference between hashmap and hashtable in java?

943


What is the nested interface?

1108


How does a for loop work?

988


do I need to use synchronized on setvalue(int)? : Java thread

1010


What is the final keyword denotes?

1110


What is executor memory?

949


Give an example of use of pointers in java class.

1031


Is set sorted in java?

932


Explain the difference between extends thread vs implements runnable in java?

1130


Can you run java program without main method?

1062