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 |
How will you get the platform dependent values like line separator, path separator, etc., ?
When is the garbage collection used in Java?
What is a prefix function.write down a code to compute prefix function.
What is javac used for?
What is hash in java?
What is the difference between access specifiers and access modifiers in java? 16
Define a java class.
What is the Scope of Static Variable?
What are the default and parameterized constructors?
What is final method in java?
explain the concept of virtual method invocation in polymorphism in detail?
Is there is any error if you have multiple main methods in the same class?