Java Data Type Tutorial - Java Float.intBitsToFloat(int bits)








Syntax

Float.intBitsToFloat(int bits) has the following syntax.

public static float intBitsToFloat(int bits)

Example

In the following code shows how to use Float.intBitsToFloat(int bits) method.

public class Main {

   public static void main(String[] args) {
  
     System.out.println(Float.intBitsToFloat(123));
     System.out.println(Float.intBitsToFloat(0x7f800000));  
     System.out.println(Float.intBitsToFloat(0xff800000));  
   }
}

The code above generates the following result.