+ 2
For every if statement must there be a corresponding else statement
for example I am nesting three if statement together can I use only one else statement of I have to write three else statement also
4 Answers
+ 14
You can have an if statement without a corresponding else statement.
+ 14
not necessary
+ 10
You can use unlimited number of if statement without else statement
+ 9
if () {}
if () {} else {}
if () {} else if () {} else {}
if () {} else if () {}
if () {if () {} else {}}
if () {if () {} else {}} else {}
...........
Everything is accepted......