0
Java 15.2
I entered the code to the best of my ability, but for the life of me- I just can't seem to find out what the last edge case is. Below is a sample of my code. switch(emotion){ case 1: System.out.println("You are happy!"); case 2: System.out.println("You are sad!"); case 3: System.out.println("You are angry!"); case 4: System.out.println("You are surprised!"); default: System.out.println("Unknown emotion."); }
5 Respostas
+ 7
You're missing a "r" in surprised!
+ 3
Is that a typo in the '2 case'? I guess it should've been like ...
System.out.println( ... );
+ 3
case 2 printl m typo
case 4 ; missed
default ; missed
add break after each case
+ 2
In suprised you missed r
+ 2
These people are sneaky