Multiple Choice Moderate

QWhat does a nested if statement allow you to do?

ID: #24863 Control flow in programming 10 views
Question Info
#24863Q ID
ModerateDifficulty
Control flow in programmingTopic

Select All That Apply

Tick every correct option, then press Check Answer.

  • A Combine multiple conditions
  • B Repeat a block of code multiple times
  • C Handle multiple alternatives in a single block
  • D Define a function inside another function
Correct Answer

Explanation

Correct Answer:

(A) Combine multiple conditions

Explanation:

A nested if means placing one if inside another if.

Example:

  
    if(age > 18){
if(country.equals("India")){
System.out.println("Eligible");
}
}

Share This Question

Challenge a friend or share with your study group.