+ 3
Is else is required in else if statement.
3 Respuestas
+ 4
No it is not compulsory to use 'else' after 'if'. But it is compulsory to use 'if' before 'else'.
In one sentence 'if' is compulsory but 'else' is optional
+ 1
You need not have an "else" after "if", it is just used to do something if at all your "if" fails.
0
No it's not essentially to have "else" block, bz it's executes only if the given condition is false in "if" block.