0
Using the else statement after if is not mandatory?
2 Answers
0
whether its mandatory or not depends on the conditions that you use in the program .
0
Using else isn't necessarily mandatory. You can just as correctly do this:
if(condition){
//stuff
}
if(otherCondition{
//more stuff
}
as this:
if(condition){
//stuff
}
else{
//more stuff
}