What is the difference between else if ladder and switch ?
Answers
Answered by
1
Answer:
In else if ladder, the control goes through the every else if statement until it finds true value of the statement or it comes to the end of the else if ladder. In case of switch case, as per the value of the switch, the control jumps to the corresponding case.
Answered by
0
Answer:
not much
Explanation:
in if else every condition is checked. in switch case the exact matching case handles the logic . if you have more than 5-6 if else better use switch instead.
Similar questions
Physics,
11 days ago
History,
11 days ago
Math,
11 days ago
Computer Science,
22 days ago
Social Sciences,
22 days ago
Math,
8 months ago
English,
8 months ago