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   w  ww.j  a va2  s.com
   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.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable