Advertisements
Advertisements
प्रश्न
_______ statement can be used as alterative to if-else statement.
पर्याय
While
If
Else-if
Switch
Advertisements
उत्तर
Switch statement can be used as alterative to if-else statement.
APPEARS IN
संबंधित प्रश्न
Which statement in switch case is used to exit the statement once the appropriate choice is found?
Which of the following is not a branching statement?
In which loop the condition is evaluated, before executing a statement?
Differentiate the break and continue statement.
What is if statement and write its types.
Write the syntax for else-if statement.
What message will be displayed, if the input for age is given as 20, for the following snippet?
Explain switch case statement with example.
The absence of which statement leads to fall through situation in switch case statement?
Consider the following program segment and select the output of the same when n = 10:
switch(n)
{Case 10: System.out.println(0*2);
case 4: System.out.println(n*4); break;
default : Syslem.out.println(n);
}