This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Get Mod (remainder) in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Get Mod (remainder) in java" Watch "Get Mod (remainder) in java" New topic

Get Mod (remainder) in java


Joined: May 04, 2005
Posts: 28
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<br />Marie
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

a % b

[Jess in Action][AskingGoodQuestions]
Consider Paul's rocket mass heater.
subject: Get Mod (remainder) in java