Question: / / Consider the following switch and case statement and evaluate what gets print out for different string values of month: switch ( month )
Consider the following switch and case statement and evaluate what gets print out for different string values of month:
switch month
case "Jan":
case "Feb":
case "Mar":
System.out.printlnFirst Quarter";
break;
case "Apr":
case "May":
case "Jun":
System.out.printlnSecond Quarter";
break;
case "Jul":
case "Aug":
case "Sep":
System.out.printlnThird Quarter";
break;
case "Oct":
case "Nov":
case "Dec":
System.out.printlnFourth Quarter";
break;
default:
System.out.printlnInvalid Month";
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
