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

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

Want to excel in Java? Test your knowledge with our ultimate quiz based on 'Thinking in Java'. Engage with multiple-choice questions and in-depth explanations. Boost your understanding and prepare for your exam with confidence.

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.


Which of these is NOT a relational operator in Java?

  1. <=

  2. ==

  3. =>

  4. !=

The correct answer is: =>

Relational operators are used to compare two values in Java. The <= (less than or equal to) operator checks if the left value is less than or equal to the right value. The == (equal to) operator checks if the two values are equal. The != (not equal to) operator checks if the two values are not equal to each other. These operators are all part of the relational operators in Java. On the other hand, the => (greater than or equal to) operator is not a relational operator in Java. It is commonly used as part of the function syntax in lambda expressions, not for comparing values. Therefore, the correct answer is C =>.