Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Math.round()

 
nachagoni rishi
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to read the Java API for Math.
There is an explanation in the description of the round methods.
 
Arnab karmakar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi barry,

can u please tell me whether these type of question comes in SCJP exam or not.
atnab
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic