Java Data Type Tutorial - Java Double.longBitsToDouble(long bits)








Syntax

Double.longBitsToDouble(long bits) has the following syntax.

public static double longBitsToDouble(long bits)

Example

In the following code shows how to use Double.longBitsToDouble(long bits) method.

public class Main {
//from  ww w . j a v  a 2  s.c o  m
   public static void main(String[] args) {
     Double d = new Double("1.30");
   
     System.out.println(d.longBitsToDouble(6757689));
     System.out.println(d.longBitsToDouble(0x7ff0000000000000L));  
     System.out.println(d.longBitsToDouble(0xfff0000000000000L));  
   }
}

The code above generates the following result.