0
Bank customer
Please check it and repost me what is my mistake https://code.sololearn.com/cDFAxgPicdIe/?ref=app
4 Answers
+ 4
Saitheja Komalla Run it on CodePlayground and you'll get a very self-explanatory error message.
Hint: Try to find the ^
As soon as you fix it your code will compile but there are runtime errors aswell. I was too slow and Jayakrishnađźđł already help you with that.
+ 3
The flush method is not from System.out stream, and also don't work here, remove that..
Remove semicolon after in catch (...);
You are write case statements 2 times, why?
Dublicate cases not allowed... Remove all double statements.. It is only like...
case 'A' :
case 'B' :. ...
..
+ 1
Thank you Jayakrishnađźđł sir
0
-use break after each case block
-because Sytem.in.read() get byte and console can send value only with endOfLine like B\n you need read this \n separately before you try scan eg bank number
sc.nextLine();
String Banknumber = sc.nextLine();
- On sololearn twice Scanner(System.in) used not works
one scanner declared before switch is enough