aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Math.round() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Math.round()" Watch "Math.round()" New topic
Author

Math.round()

nachagoni rishi
Greenhorn

Joined: Oct 14, 2004
Posts: 26
how does Math.round work?
does it add 0.5 and do a ceil() or floor() depending on the number after the decimal point
or
it adds 0.5 and always does a Math.floor()
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Please take the time to read the Java API for Math.
There is an explanation in the description of the round methods.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Arnab karmakar
Ranch Hand

Joined: Oct 04, 2004
Posts: 46
hi barry,

can u please tell me whether these type of question comes in SCJP exam or not.
atnab
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Math.round()
 
Similar Threads
Math.round (from Poddar exam)
Math.Round
Math.round
converting a float to an integer?
Math.round( -.5)?