Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Dive into the depths of Java with our quiz based on "Thinking in Java, Fourth Edition" by Bruce Eckel. Test your knowledge, solidify concepts, and prepare for certification with challenging questions and insightful feedback.

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What does the modulus operator (%) in Java return?

  1. A quotient

  2. A remainder of division

  3. A float result

  4. A boolean result

The correct answer is: A remainder of division

The modulus operator (%) in Java returns the remainder of division between two numbers. This is different from the quotient (result of division) or a float result. Additionally, the modulus operator does not return a boolean (true or false) result. Therefore, A, C, and D are incorrect options.