Single Choice
Moderate
QCorrect syntax is:
ID: #25917
MCQ Quiz - Class 8 - Decision Control Structure
4 views
Question Info
#25917Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - Decision Control StructureTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Correct Answer Explanation:
Java syntax uses parentheses for the condition and curly braces for both if and else blocks.
Why the other options are incorrect:
- Option B: 'then' isn't Java syntax; use braces.
- Option C: Java uses 'else if' (with space), not 'elseif'.
- Option D: There is a correct syntax.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic