is it possible to add a object in a HASHMAP
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ravikiran
Yes we can add Object as a value inside HashMap
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / janardhan
yes we can add object in Hashmap
example:--
ArrayList l=new ArrayList();
l.add(10);
HashMap map=new HashMap();
map.put(l,"13");
here l is object
| Is This Answer Correct ? | 4 Yes | 0 No |
Can private class be extended java?
Why we use protected in java?
What is the difference between superclass and subclass?
Can you write a java class that could be used both as an applet as well as an application?
Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls
Can extern variables be initialized?
Which variable is the independent variable?
how to handle http request in struts
What for read() function?
What is the integer of 16?
What is autoboxing in java?
Why is multithreading important?