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

What is the multi-catch block in java?

997


What does the “static” keyword mean?

1045


What is a numeric format?

1005


Which of the following classes will have more memory allocated?

971


What does %4d mean in java?

1420


Can a string be null?

924


Which methods cannot be overridden in java?

923


Can I learn java in 3 months?

960


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

1076


What is high level language in computer?

967


What is methods and methodology?

968


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

959


How do you sort arraylist in descending order?

980


What is a class in java?

960


Explain the transient field modifier?

962