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 / mallu

No error will be generaterd.

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you declare the main method as final?

696


Does importing a package imports its sub-packages as well in java?

726


Write code of any action class?

706


Explain JMS in detail.

792


Can static methods be inherited?

740






What is sorting in java?

716


What is the size of an array?

743


Is string is a keyword in java?

723


What is a void in java?

761


What is integer size in java?

683


How are variables stored in memory?

788


Outline the major features of java.

768


What do you mean by default constructor in java?

779


What is the difference between class forname and new?

746


What are the types of sockets in java?

731