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.


In Java, which operator can change the value of its operand through 'side effects'?

  1. Comparison operator

  2. Logical operator

  3. Assignment operator

  4. Additive operator

The correct answer is: Assignment operator

The assignment operator (=) is the only operator that can change the value of its operand through side effects. Comparison operators (==, !=, >, <, >=, <=) only compare values and do not alter them. Logical operators (&&, ||, !) only perform logical operations and do not change the values of its operands. Additive operators (+, -) only perform mathematical operations and do not change any values. The assignment operator is unique in that it can both assign a value to its operand and modify its original value.