1Z0-811 Primitives, Strings and Operators Practice Question
Which THREE of the following statements about operators in Java are true?
⚠ Common exam trap
Oracle often tests the misconception that `==` compares object content for reference types, when in fact it compares references, and that `>>` always fills with zeros, confusing it with the unsigned right shift `>>>`.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The instanceof operator can be used to check if an object is an instance of a class.
The `instanceof` operator in Java is a binary operator used to test whether an object is an instance of a specific class, subclass, or interface. It returns `true` if the object is an instance of the specified type, otherwise `false`, and is commonly used for type checking before casting.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The instanceof operator can be used to check if an object is an instance of a class.
Why this is correct
Correct usage.
- ✗
The right shift operator (>>) always fills with zeros.
Why it's wrong here
Signed shift fills with sign bit; >>> fills with zeros.
- ✓
The assignment operator (=) has the lowest precedence.
Why this is correct
Only after all others.
- ✗
The equality operator (==) compares the content of objects.
Why it's wrong here
Compares references, not content.
- ✓
The conditional operator (&&) short-circuits: if left operand is false, right operand is not evaluated.
Why this is correct
Short-circuit behavior.
Go deeper
Related to this question
About these practice questions
One of 481 original 1Z0-811 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.