Java UUID .getLeastSignificantBits ()

Syntax

UUID.getLeastSignificantBits() has the following syntax.

public long getLeastSignificantBits()

Example

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


/*from ww w. j av a  2s .co m*/
import java.util.UUID;

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

The code above generates the following result.