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

Unresolved compilation error will come.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is array and arraylist in java?

520


What is the difference between == and === javascript?

565


What is fail fast in java?

573


Why packages are used?

536


What initialize variables?

502






Explain about the dynamic behavior of core java?

628


What is the purpose of static methods and static variables?

538


What is variable and rules of variable?

508


I want to persist data of objects for later use. What’s the best approach to do so?

498


Can abstract class have private constructor?

492


What is the main difference between java platform and other platforms?

499


What’s the difference between unit, integration and functional testing?

610


Can we cast any other type to boolean type with type casting?

533


What is a instance variable in java?

541


Explain the difference between static and dynamic binding in java?

536