Look at the java.text.DecimalFormat class
float aFloat = (float)1.0;
DecimalFormat df = new DecimalFormat("0.00");
System.out.println(" THIS IS A 2 demical float " + df.format(aFloat));
-spike
----
Spike Washburn ([EMAIL PROTECTED])
Allaire Corp.
-----Original Message-----
From: James Tuan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 25, 1999 3:10 PM
To: [EMAIL PROTECTED]
Subject: Sorry BUT ... Simple Java question
Sorry for the post, but I've been looking way to long
for an example that prints out:
float aFloat = 1.0;
out.print(" THIS IS A 2 demical float " + aFloat );
Output is :
THIS IS A 2 demical float 1.00
Thanks
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html