0
What is wrong in it
I tried to get the input as string but it doesn't seem to . It says , curly brackets are Missing. https://code.sololearn.com/cJ9D8X65gg6I/?ref=app
3 Réponses
+ 1
Line No : 7 , sc.nextLine() not newLine
and Line No. 10 , case "Monday":
"c" of case should be small and Monday is a string, so it should be enclosed in double qoutes
0
1. Write „case“ in small letters.
2. Put „Monday“ in quotation marks because it is a string.
3. Use sc.nextLine() instead of sc.newLine().
0
in switch “Case” is case, Monday in quotes. in Scanner when you take the input,the method is “nextLine()” nor newLine()