0

Using the else statement after if is not mandatory?

8th Jul 2016, 8:59 AM
ANIMESH GUPTA
ANIMESH GUPTA - avatar
2 Answers
0
whether its mandatory or not depends on the conditions that you use in the program .
12th Jul 2016, 1:54 AM
Avinash Bhuma
Avinash Bhuma - avatar
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 }
28th Jul 2016, 8:37 PM
Matt Ferrie
Matt Ferrie - avatar