Java UUID.clockSequence()

Syntax

UUID.clockSequence() has the following syntax.

public int clockSequence()

Example

In the following code shows how to use UUID.clockSequence() method.


/*from   w w  w.j  ava2s. com*/

import java.util.UUID;

public class Main {
   public static void main(String[] args) {
      // creating UUID      
      UUID x = UUID.randomUUID();
        
      // getting clock sequence value
      System.out.println("Clock sequence value: "+x.clockSequence());    
   }    
}

The code above generates the following result.