3:53 pm - Tuesday March 24, 2364

Float Example program for toHexString(float f)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
Author :candidjava.com
Description: Program using toHexString(float f) method
*/
import java.io.*;
public class ToHexStringEx
{
public static void main(String args[]) throws Exception
{
Float f1=new Float(0);              // Declare a float object
System.out.println(f1.toHexString(100.1f));  // Returns a hexadecimal string representation of the float
                                                                                     argument.
}
}

OUTPUT:

0x1.906666p6

BACK

Filed in: Z-A All Java Codes

Comments are closed.