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...

Map map = new HashMap(2);
map.add(“1”,”one”);
map.add(“2”,”two”);
map.add(“3”,”three”); What will happen at this line?

Answer Posted / haneef

see, there is no add() in the Map, so u will get compilation
error.

there is only put();

Is This Answer Correct ?    22 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the selection sort algorithm and state its time complexity?

1008


What is volatile data type?

985


What is the main use of generics in java?

971


what do you understand by the term string with respect to java?

1020


Difference between Linked list and Queue?

1018


What is public/private protected in java?

1029


How do you identify independent and dependent variables?

994


Write a program to find maximum and minimum number in array?

979


Which programming language is most secure?

974


What is difference between char array and string?

1098


What are the five major types of reference sources?

1097


What is a singleton factory?

948


Can arraylist hold different types java?

961


How do you add an element to a hashset in java?

992


What is difference between string and new string?

1017