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