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 |
what is the J2EE BluPrints?
What is stop(), suspend(), resume() method?
What does three dots mean in java?
Can a class be private in java?
what is the difference between preemptive scheduling and time slicing? : Java thread
Write the code for Palindrome ?
What is 16 bits called?
Explain about assignment statement?
Is cout buffered?
what is multitherading
This is related to threads. I have a class with synchronized method m1(). Can I create different instances of this class and execute the m1() for different threads?
What is the class in java?