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 there any difference between nested classes and inner classes?

1161


How do you compare values in java?

1094


What is unsigned char?

1129


What is ‘has a’’ relationship in java?

1275


Is sizeof a keyword in java programming?

1120


Can we use a switch statement with strings?

1105


What is finally block?

1123


What is passing by reference in java?

1072


How will you get the platform dependent values like line separator, path separator, etc., ?

1078


Can a source file contain more than one class declaration?

1053


What must a class do to implement an interface in java programming?

1132


Will the compiler creates a default constructor if I have a parameterized constructor in the class?

1165


Write code to implement bubble sort in java?

1047


How many digits can a float hold?

1064


Is oracle java 11 free?

1011