What is Hash Code in Java?

Answer Posted / siva thimmannagari

everyone knows that,the objects in the HASHMAP will be
stored in the form of Key,Value pair..

Here key is the hashcode

String s1="shiva";

if u want to know the hashcode for s1--simply type
s1.hashcode();this will give the hashcode which will be
used as a KEY

Is This Answer Correct ?    7 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What 4 doubled?

723


Can we create our own wrapper class in java?

724


What is class level lock ?

786


How are java objects passed to a method and what are native methods?

794


How do I start learning java?

754






Explain about doubly linked list

799


Can we make a constructor final?

741


Is java platform independent?

746


How is a variable stored in memory?

718


What do you mean by append?

708


What is Java Reflection API? Why it’s so important to have?

802


What is the purpose of garbage collection in java, and when is it used?

754


What is javac used for?

677


Explain the difference between throw and throws in java?

744


What is meant by object oriented programming – oop?

735