+ 1

Why am I getting error while using switch expression in java

my code link: https://code.sololearn.com/c9dHCNo0n9O7

26th Nov 2021, 5:52 AM
Atulya Vaibhav Pandey
Atulya Vaibhav Pandey - avatar
3 Respostas
+ 6
Line 5: Double definition of variable <day> [delete line] Line 7: Call to nextInt() method was missing parentheses [add parentheses -> day.nextInt()] Line 12: Excess (unnecessary closing curly bracket) [delete line] No statement to print <daytype>, leads to "No output"
26th Nov 2021, 6:22 AM
Ipang
+ 3
I fixed it
26th Nov 2021, 6:49 AM
Atulya Vaibhav Pandey
Atulya Vaibhav Pandey - avatar
+ 2
Good job! 👍
26th Nov 2021, 6:50 AM
Ipang