0
I didn't understand The switch statement and multiple conditions in intro to java. Can you teach me this?
1 Antwort
0
Switch statement is used when you know the input should be so and so value it can be anything like integer, string.
Example
Case 1
Case 2
Case 3
And multiple if statement is used when there are range of values and anything to be compared
If grade > 40{
// Some code
}
Else if grade >= 60 && grade < 70{
// Some code
} Else {
// Some code
}