Else part is compulsory in if-else statement
Answers
Answered by
2
Answer:
No, It's not required to write the else part for the if statement. In fact most of the developers prefer and recommend to avoid the else block. This is purely a matter of style and clarity. It's easy to imagine if statements, particularly simple ones, for which an else would be quite superfluous.
Explanation:
I hope you get help.
Similar questions