Write 2 points of differences each between
a. if else and if else if statement
Answers
Answered by
0
Answer:
1)
when using else you cannot give condition
when using else if you can give condition
2)
only one else statement can be inserted in one if else syntax
for example:
if(something) {
} else {
// only one else can be inserted
}
multiple else if can be inserted in one if else syntax
if(something) {
} else if(something){
}else if(something){
}else if(something){
}
Similar questions