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

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

Prepare for your Java exam with our ultimate quiz based on 'Thinking in Java'. Engage with expertly crafted questions that enhance your learning process. Perfect for Java enthusiasts looking to solidify their knowledge!

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.