Controlling program flow
4 practice questions under this official exam objective (1Z0-819) — each with the community-verified answer, a full option-by-option explanation and instant feedback.
What Does a for-Loop Stepping by Two Print?
A Java for-loop that starts its counter at 1 and advances by two while the counter stays below 10 prints exactly the odd values 1 3 5 7 9. This page c
Enum Switch Result with Unused Stream dropWhile
This question tests the interaction between an unused Stream dropWhile operation and a switch expression on an enum. The page establishes that the int
Java Switch Expression Result Analysis
This question tests the behavior of Java switch expressions and pattern matching. The code snippet demonstrates how a switch expression evaluates a st
Java Switch Statement Output Without Break
This question tests the execution flow of Java switch statements, specifically how the absence of break statements leads to fall-through behavior. The