Java Float.floatToIntBits(float value)

Syntax

Float.floatToIntBits(float value) has the following syntax.

public static int floatToIntBits(float value)

Example

In the following code shows how to use Float.floatToIntBits(float value) method.


public class Main {
//  w w w  . j  a v a 2  s. c om
   public static void main(String[] args) {

     System.out.println("Value = " + Float.floatToIntBits(5.5f));  
   }
}

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