A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
stop the double type value up to 2 or 3 decimal
Joined: Aug 19, 2001
Aug 21, 2001 06:19:00
answer will com like this
but i want
how it could be possible
send me excercises about <BR>biggener level
Joined: Jan 09, 2001
Aug 21, 2001 06:25:00
DecimalFormat df = new DecimalFormat( "#.00" ); System.out.println( df.format( 567.236587 ) );
Joined: Jul 27, 2001
Aug 21, 2001 07:40:00
If you want a number and not a
, you can do it simply enough with the following code:
float unrounded = 567.2365874589f;
float rounded = Math.round(unrounded * 100) / 100.0f;
I agree. Here's the link:
subject: stop the double type value up to 2 or 3 decimal
Most addictive song ever.
Anyone finish this in a month!!!???
Values for weightx and weighty
Why is "float f4 = 42e7" not considered a valid declaration of a float in Java?
WA #2 ..... word association
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014