Question: In Java, What will be stored into the char grade? int gradeNum = 8 ; char grade = switch gradeNum ) { case 1 ,

In Java, What will be stored into the char grade?
int gradeNum =8;
char grade = switch gradeNum){
case 1,2,3->'C';
case 4,5,6->'B';
case 7,8,9->'A';
};
This is not a proper switch statement so this will raise an error
C
B
A
 In Java, What will be stored into the char grade? int

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!