Online Java Compiler By
JavaTpoint.com
public class Float_floatToRawIntBitsMethod_Example2 { public static void main(String[] args) { //passing negative value float f1=-658756.5756756f; Float f2= new Float(-6547.65776f); //either call floatToRawIntBits() method this way int f3=Float.floatToRawIntBits(f1); System.out.println(f1+"value in Raw Int bits = "+f3); //either call it directly inside println System.out.println(f2+" value in Raw Int bits = "+Float.floatToIntBits(f2)); } }
Output