+ 1
What is switch case?
3 ответов
+ 7
Its a conditional, like if case. you can evaluate more cases with switch.
switch(x){
case 0:
//do code0
case 1;
//do code1}
Its like
if (x == 0) code0;
if(x==1)code1;
0
switch is an alternative to nested if else selection
0
Both the above mentioned answers are correct