What's if- else statement?
It is a conditional statement you are use in if else statement then syntax is if( condition)
if your condition is true then statment block 1 is executed .if your condition is false then statement2 is executed
It's a conditional statement, which is used to reduce the procedure after getting required answer or once condition is satisfied.
Theif...else statement is used if the programmer wants to execute some statement/s when the test expression is true and execute some other statement/s if the test expression is false.
If statement says something is correct then do this predermine task which given by user if condituon fail so do another task which also given by user.
And yes if yu r supposd to use if else mny tym thn yu cn go for nested if else......
In simple term
if u want to execute different statements on conditional basis then u have to use if-else statement.