hashcode java code example
Example 1: java hashcode
@Overridepublic int hashCode() { int hash = 7; hash = 31 * hash + (int) id; hash = 31 * hash + (name == null ? 0 : name.hashCode()); hash = 31 * hash + (email == null ? 0 : email.hashCode()); return hash;}
Example 2: Java array hashcode
java.util.Arrays.hashCode(new int[1]) // for one dimensional arrays
java.util.Arrays.deepHashCode(new int[1][1]) // for mutli-dimensional arrays