1if (condition1) {
2 // block of code to be executed if condition1 is true
3} else if (condition2) {
4 // block of code to be executed if the condition1 is false and condition2 is true
5} else {
6 // block of code to be executed if the condition1 is false and condition2 is false
7}
1if (condition a) {
2 // code that will execute if condition a is true
3} else if (condition b) {
4 // code that will execute if condition b is true
5} else if (condition c) {
6 // code that will execute if condition c is true
7} else {
8 // code that will execute if all above conditions are false
9}