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
Environmental Sciences,
27 days ago
English,
27 days ago
Math,
27 days ago
Computer Science,
1 month ago
Social Sciences,
1 month ago
Math,
9 months ago
English,
9 months ago