Loading…
Loading…
Ten exam-style questions on integer division and remainder, numeric promotion, widening and narrowing casts, overflow, constant expressions, compound assignment and the value of an assignment, with explanations.
Practice questions for the article Java Arithmetic, Numeric Promotion, Casting and Assignment Operators.
The questions follow Java 21 rules, as on the 1Z0-830 exam. For every expression, work out the type of each intermediate result before thinking about values. Aim for at least 8 out of 10 before moving on.
Quiz path: step 10. Take the quizzes in this order, after reading each article.
Previous quiz: Operator Precedence and Unary Operators (OCP 21)
Next quiz: Equality, Relational, Logical and Ternary 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.