Help me find the error. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
7th May 2020, 5:34 PM
Jude
Jude - avatar
7 Answers
+ 4
https://code.sololearn.com/c9yFeXPbE5d9/?ref=app Ur bug fixed here 1. remove line that i commented 2. use day. next() in switch 3. use 1 as string "1" in cases becoz scanner scans a string not a number 4. some misplaced semicolons
7th May 2020, 5:52 PM
Abhay
Abhay - avatar
+ 2
Default does not need the line "break".
9th May 2020, 12:25 PM
Olatunji Adebayo
Olatunji Adebayo - avatar
+ 1
'age' is not defined and on case 2 4 and 6 mack it println()
7th May 2020, 5:43 PM
estifanos
estifanos - avatar
+ 1
Thank you Abhay
7th May 2020, 5:54 PM
Jude
Jude - avatar
+ 1
You still need to close the scanner. .... } day.close(); } }
7th May 2020, 10:22 PM
Evseev Anton
Evseev Anton - avatar
0
How to define age estifanos ? I'm new to Java.
7th May 2020, 5:46 PM
Jude
Jude - avatar
0
Int age = 1;
7th May 2020, 5:48 PM
estifanos
estifanos - avatar