Is it necessary to use else at the end of else-if statements.Can’t we just use else if for the last possible statement also?
Use of else in else-if blocks
No it is not necessary to use an else statement at the end of if-else. You can use
- if-else,
- only if
- if-else if-else
- if - else if
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.