0

I didn't understand The switch statement and multiple conditions in intro to java. Can you teach me this?

24th May 2025, 8:56 AM
Glint
Glint - avatar
1 Resposta
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 }
24th May 2025, 11:03 AM
Aysha