Advertisements
Advertisements
Question
Which of the following is not a branching statement?
Options
Loop
If-else
Switch
For
MCQ
Advertisements
Solution
Loop
shaalaa.com
Introduction of Conditional Statements in Java
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
_______ statement can be used as alterative to if-else statement.
The _______ statement is especially useful when testing all the possible results of an expression.
What are the different types of control statement used in JavaScript?
What is meant by conditional statements in JavaScript?
Write the general syntax for switch statement.
What is if statement and write its types.
Explain switch case statement with example.
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);
}Rewrite the following code using the if-else statement:
int m = 400;
double cl). = (m>300) ? (m/10.0) * 2; (m/20.0) - 2;Which of the following data type cannot be used with switch case construct?
