{ public class HashStudent { public static void main(String[] args) { Student mickey = new Student("Mickey", "Mouse"); CustomHasher hs = (s) -> { long value = 5381; for (char c : s.getLastName().toCharArray()) { value = ((value << 3) + value) + (int)c; } for (char c : s.getFirstName().toCharArray()) { value = ((value << 3) + value) + (int)c; } return value; }; System.out.println("Hash is: "+ hs.hash(mickey) ); } } }