dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Convert Float to Bits

See how to convert a float number to bits in Java.


advertisement

Java provides a built-in method for converting a float number to bits as shown below:

long longBits = Double.doubleToLongBits(someDouble);
System.out.println(Long.toBinaryString(longBits)); 

 

Visit the DevX Tip Bank

 



   
Thanks for your registration, follow us on our social networks to keep up-to-date