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 need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?
write a program to create an vector and listeterator.and value should be enter through keyboard.
What are autoboxing and unboxing? When does it occur?
What is difference between identifier and variable?
can any body tell me? does advance java and j2ee both are same.
What is ascii format?
Give few examples of final classes defined in Java API?
How do you set security in applets?
List types of storage classes in java?
Can an anonymous class be declared as implementing an interface and extending a class?
What is casting?
Is an integer an object?