Can we place the any object to key attribute of
HashMap<key,value>?
Answer Posted / patil abhijeet
Hi Ramarao,
Its not necessary to override hashCode() since hashcode is
default generated for every object. Please try my example n
check it by urself
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What are the pillars of java?
What is stringjoiner ?
How to create a thread in java?
What is difference between word and integer?
Why is static used?
Which method cannot be overridden in java?
What is the difference between synchronized and synchronized block?
How does arrays sort work in java?
Difference difference paint() and paintcomponent()?
What is data member in java?
Can a class be a super class and a sub-class at the same time? Give example.
What is empty string literal in java?
What is thread pool in java with example?
What are 3 data types?
Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?