UUID.hashCode() has the following syntax.
public int hashCode()
In the following code shows how to use UUID.hashCode() method.
//from w ww . j a v a2 s.c o m import java.util.UUID; public class Main { public static void main(String[] args) { // creating UUID UUID uid = UUID.randomUUID(); // checking hash code value System.out.println("Hash code value: "+uid.hashCode()); } }
The code above generates the following result.