Skip to content
Advertisement

Java exception [SWITCH && SCANNER]

I was trying to make my first java program with the use of switches and scanners, but I just can’t fix the error that returns me.

Error:

JavaScript

Code:

JavaScript

Forgive me for the bad order in writing the code.

Advertisement

Answer

Your switch-case syntax is missing the break; statements Try this code:

JavaScript
Advertisement