0

I write this code but I really don't get meaning of error?

Help me fix this error or give breif explanation if possible for first user widthwal will get successful but for second some exception error is occurring? See below code https://code.sololearn.com/chi9YuuTPGE2/?ref=app

12th Jun 2019, 11:54 AM
Bhavesh Kalkani
Bhavesh Kalkani - avatar
4 ответов
+ 6
You can't create a new scanner twice. The second will not have access to the input. The exception occured when you attempted to read an integer from the second scanner as there was nothing available.
13th Jun 2019, 5:29 PM
John Wells
John Wells - avatar
+ 4
Move the scanner so it is created only once like this: https://code.sololearn.com/cpgKlAHbmDjy
14th Jun 2019, 9:26 AM
John Wells
John Wells - avatar
+ 1
So what's is the solution for this I want two user to concurrently access same account for widthdrawal of money.
14th Jun 2019, 6:59 AM
Bhavesh Kalkani
Bhavesh Kalkani - avatar
14th Jun 2019, 7:00 AM
Bhavesh Kalkani
Bhavesh Kalkani - avatar