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

How to make object serializable in java?

1033


What is api data?

1054


What is module with example?

1103


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

1065


What is meant by final class?

1189


What is static method with example?

1259


How can we find the sum of two linked lists using stack in java?

1254


What are the types of sockets in java?

1221


I want to print “hello” even before main is executed. How will you acheive that?

1153


What is void keyword?

1162


What is a get method?

1137


What does sizeof return?

1038


What is the use of static methods?

1101


What is a map in java?

1056


Why are global variables used?

1083