Can we place the any object to key attribute of
HashMap<key,value>?
Answer Posted / ramarao katta
yes, we can place any object as key value but that object
must and should implement the hashcode method.
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Under what conditions is an object’s finalize() method invoked by the garbage collector?
What is difference between calling start() and run() method of thread?
Why arraylist is not synchronized in java example?
Why array is used in java?
What defines function?
How to make a write-only class in java?
What is the disadvantage of java?
What Is Query Throttling in java?
What is comparable and comparator interface? List their differences
Can the garbage collection be forced by any means?
What is unmodifiable list in java?
What is final, finally, finalize?
What are the default and parameterized constructors?
Can interface be private in java?
What are the main uses of java?