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 {
/*from   w w w .j  av  a  2s  .co m*/
   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.





















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