Java practice 14.2 can't complete the 5 mission | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Java practice 14.2 can't complete the 5 mission

This is my code: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int emotion = scanner.nextInt(); switch(emotion){ case 1: System.out.print("You are happy!"); break; case 2: System.out.print("You are sad!"); break; case 3: System.out.print("You are angry!"); break; case 4: System.out.print("You are suprised!"); break; default: System.out.print("Unknown emotion."); } } }

5th Aug 2022, 3:48 PM
Dav08idT
Dav08idT - avatar
2 Answers
+ 3
"Suprised!" Check your spelling... should be "Surprised!"
5th Aug 2022, 3:53 PM
Jayakrishna 🇮🇳
+ 1
Thank you very much I was cant to find this problem, Thanks buddy!!!😁
5th Aug 2022, 3:56 PM
Dav08idT
Dav08idT - avatar