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
English,
3 hours ago
Science,
3 hours ago
English,
3 hours ago
Computer Science,
5 hours ago
Social Sciences,
5 hours ago
Math,
7 months ago
English,
7 months ago