Close

Java Utils - Objects.hash() Examples

Code Snippets Java Utils Java Java API 


Class:

java.util.Objects

java.lang.Objectjava.lang.Objectjava.util.Objectsjava.util.ObjectsLogicBig

Method:

public static int hash(Object... values)

Generates a hash code for a sequence of input values. The method is useful for implementing Object#hashCode().


Examples


package com.logicbig.example.objects;

import java.util.Objects;

public class HashExample {

public static void main(String... args) {
int i = Objects.hash("one", 3, 'e');
System.out.println(i);
}
}

Output

105914887




See Also