Online Java Compiler By
JavaTpoint.com
public class Double_doubleToRawLongBitsMethod_Example3 { public static void main(String[] args) { //passing negative value double d1=-65876856.6756756; Double d2= new Double(7658659.78678); //either call doubleToRawLongBits() method this way long d3= Double.doubleToRawLongBits(d1); System.out.println(d1+"value in Raw long bits = "+d3); //either call it directly inside println System.out.println(d2+" value in Raw long bits = "+d2); } }
Output