Q. What will be the output of System.out.println(10 % 3);?

A
3
B
1
D
3.33
Solution:

The modulus operator (%) returns the remainder of a division. 10 divided by 3 is 3 with a remainder of 1.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!