+ 1

how to use else if and switch

14th Jul 2016, 1:49 PM
Kushagra Bhatia
Kushagra Bhatia - avatar
4 Answers
+ 1
switch is an alernative for else if statement. But switch is fast in execution compared to else if. when you need to select an option among many then use switch.
14th Jul 2016, 3:07 PM
B. K.
0
if(test){ code }else{ code }
14th Jul 2016, 2:01 PM
Aditya Kolte AKo
Aditya Kolte AKo - avatar
0
switch is an alternative for if statement
14th Jul 2016, 2:02 PM
Aditya Kolte AKo
Aditya Kolte AKo - avatar
0
switch is a multi conditional statement where you can put up many conditions but in if .. else you cannot put many conditions
14th Jul 2016, 5:22 PM
Programmer