Single Choice Moderate

QNested if inside else block is:

ID: #25924 MCQ Quiz - Class 8 - Decision Control Structure 2 views
Question Info
#25924Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - Decision Control StructureTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Allowed
  • B Not allowed
  • C Error
  • D Loop only
Correct Answer

Explanation

Correct Answer Explanation:

Nested if inside an else block is perfectly allowed and forms the basis of the else-if ladder pattern.

Why the other options are incorrect:

  • Option B: It IS allowed in Java.
  • Option C: No error occurs.
  • Option D: Nesting isn't restricted to loops.

Share This Question

Challenge a friend or share with your study group.