Courseiva
Question 92 of 481
Java Basics and SyntaxeasyMultiple SelectObjective-mapped

1Z0-811 Java Basics and Syntax Practice Question

Which TWO keywords are used for decision-making in Java? (Choose two.)

⚠ Common exam trap

Oracle often tests the distinction between control flow categories, so candidates mistakenly pick looping keywords like 'for' or 'while' because they also control program flow, but they are not decision-making constructs.

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

switch

The 'if' and 'switch' statements are both decision-making constructs in Java. 'if' evaluates a boolean expression to determine which block of code to execute, while 'switch' selects a block based on the value of an expression, typically an int, String, or enum. These are the two primary keywords for branching logic.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • for

    Why it's wrong here

    Loop.

  • switch

    Why this is correct

    Multi-way branch.

  • try

    Why it's wrong here

    Exception handling.

  • if

    Why this is correct

    Conditional statement.

  • while

    Why it's wrong here

    Loop.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.