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
This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }
What is maximum size of arraylist in java?
What are different types of multitasking?
Is string a data type in java?
What is array and arraylist in java?
Can you use this() and super() both in a constructor?
When parseint method can be used?
What is boolean example?
How do you declare an array in java?
Where are variables stored?
How do you sort in java?
Explain the different forms of polymorphism?
When is finally block not called?
What is the function of compareto in java?
What are advantages of exception handling in java?