Mod function in Java...

What is the most simple way to get the quotient and remainder for in Java? is there a native mod function?
JavaConvertAsked:
Who is Participating?
 
imladrisConnect With a Mentor Commented:
Yup. You can use % to get a remainder.


i=7/3;
j=7%3;


i will wind up with 2, j with 1.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.