Java UUID.getMostSignificantBits()

Syntax

UUID.getMostSignificantBits() has the following syntax.

public long getMostSignificantBits()

Example

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


/*from   w ww.  j  ava 2s.c  o m*/

import java.util.UUID;

public class Main {
   public static void main(String[] args) {
      // creating UUID      
      UUID uid = UUID.randomUUID();     
        
      // checking most significant bits
      System.out.println("Most significant bits: "+uid.getMostSignificantBits());    
   }    
}

The code above generates the following result.