Skip to content

Instantly share code, notes, and snippets.

@jpcaruana
Created December 22, 2010 14:02
Show Gist options
  • Save jpcaruana/751540 to your computer and use it in GitHub Desktop.
Save jpcaruana/751540 to your computer and use it in GitHub Desktop.
String and hascodes
int h1 = "0-42L".hashCode();
int h2 = "0-43-".hashCode();
System.out.println("h1 = " + h1);
System.out.println("h2 = " + h2);
/*
results :
h1 = 45721201
h2 = 45721201
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment