Loading…
Loading…
Ten exam-style questions on == with primitives and references, relational operators, instanceof, logical and bitwise & | ^, short-circuit && and || with side effects, and the ternary operator's evaluation and type, with explanations.
Practice questions for the article Java Equality, Relational, Logical and Ternary Operators.
The questions follow Java 21 rules, as on the 1Z0-830 exam. For every &&, || and ? :, decide first which operands actually run. Aim for at least 8 out of 10 before moving on.
Quiz path: step 11. Take the quizzes in this order, after reading each article.
Previous quiz: Arithmetic, Numeric Promotion, Casting and Assignment (OCP 21)
Next quiz: Chapter 2 Review: Java Operators (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.