Hi Guys,
when we use if/else and when Switch?
Give an example of if/else which is not possible with Switch and vice versa.
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jun 1, 2013, 6:48 AM
If you have a variable type other than these, then you have to use an if/else ladder even if there's only a single variable involved.
Ravi ShekharPosted Jun 1, 2013, 5:20 AM
Sandeep Singh ShekhawatPosted Jun 1, 2013, 3:10 AM
mursaleen fayyazPosted Jun 1, 2013, 2:37 AM
Sandeep Singh ShekhawatPosted Jun 1, 2013, 1:58 AM
Types(Day,Month,Year, Category,Gender,CommandName,Action,Age)
same thing you can also do in if/else statments like if else ladger
But when we have candition that depends on multple parameter then need to use if/else, cann't use swicth,
like--- CommandName and CommandArguments
Type and Flag