Answer Posted / venkat
yes we can add object in Hashmap
like the example is
ArrayList list=new ArrayList();
list.add(10);
HashMap map=new HashMap();
map.put(list,"13");
here list is object
Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
How many types of methods are there in java?
What is the static field modifier?
What is keyword auto for?
Do loops java?
What is multi-catch block in java?
What do you understand by copy constructor in java?
Does .length start 0 java?
What is Hierarchy of exception?
What is the difference between a field variable and a local variable?
Explain the difference between comparator and comparable in java?
How do you add an element to a hashset in java?
What are the two environment variables that must be set in order to run any java programs?
What is the common usage of serialization? What exceptions occur during serialization?
What is string pooling concept?
Is java still relevant?