Skip to content

Instantly share code, notes, and snippets.

@jonpryor
Created September 20, 2017 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonpryor/10bfd5770c3e98143eaae04866cd1011 to your computer and use it in GitHub Desktop.
Save jonpryor/10bfd5770c3e98143eaae04866cd1011 to your computer and use it in GitHub Desktop.
// array hash
class ah {
public static void main (String[] args) {
int[] a = new int []{1,2,3};
int[] b = new int []{1,2,3};
System.out.println ("a hash: " + a.hashCode());
System.out.println ("b hash: " + b.hashCode());
}
}
$ java ah
a hash: 2018699554
b hash: 1311053135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment