java hash code and equals method

java hash code and equals method

Page 1 of 1

3 Replies - 3041 Views - Last Post: 19 May 2008 - 09:38 AM Rate Topic: -----

#1 babuj03   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-May 08

java hash code and equals method

Posted 19 May 2008 - 06:21 AM

how to calculate hashcode value for string "welcome".
Is This A Good Question/Topic? 0
  • +

Replies To: java hash code and equals method

#2 1lacca   User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: java hash code and equals method

Posted 19 May 2008 - 07:17 AM

Check the API of the String class.

And it is by no means an advanced topic, so next time please be a bit more reasonable. If you are a beginner, it is possible that a topic seems advanced for you, but for the others it is not. Also, as a beginner it is quite unlikely that you would bump into advanced topics, or if you do, you won't have much fun out of it, anyway.
Was This Post Helpful? 0
  • +
  • -

#3 skyhawk133   User is offline

  • Head DIC Head
  • member icon

Reputation: 1960
  • View blog
  • Posts: 20,404
  • Joined: 17-March 01

Re: java hash code and equals method

Posted 19 May 2008 - 07:36 AM

Removed "Advanced" topic designation.
Was This Post Helpful? 0
  • +
  • -

#4 cutegrrl   User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 77
  • Joined: 12-May 08

Re: java hash code and equals method

Posted 19 May 2008 - 09:38 AM

String str = "welcome";

int hashcode = str.hashCode();


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1