Java examples for Object Oriented Design:Hash Code
Compute hash code for two integers, a char, and a string with Objects.hash
import java.util.Objects; public class Main { public static void main(String[] args) { /* w ww .java 2s.c o m*/ int hash = Objects.hash(10, 800, '\u21b9', "Hello"); System.out.println("Hash Code is " + hash); } }