• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get Mod (remainder) in java

 
Marie
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very simple question. But it does not work. I want to get remainder from a division.

a mod b did not take.

Please let me know what would be the expression to get a remainder from a division.

Thanks
Mei
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a % b
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic