+ 1
How can I name scanner ?
i want to use scanner method to ask how much money do you want to withdraw . The box is opening and requesting user for input. how can i name it so user will see what kind of input is needed? https://code.sololearn.com/cLDko43EqHoS/?ref=app
5 Answers
+ 6
You cannot do that in SoloLearn, unfortunately. However, you can add comments to your code. Comments can introduce the visitors to the input format ;)
+ 5
Other tip: handle Exception
try{
your code}
catch (java.util.InputMismatchException e){
System.out.print("enter integer");}
catch (Exception e){
System.out.print("enter integer");}
+ 2
Use System.out.println(); but here on sololearn it doesn't show that because it takes input before the program runs
+ 1
ehh so bad, every input looks the same here and user doesnt know what to write there. anyway thanks for your help.
comments will be added as soon as program start working
+ 1
heh nice idea!
i am a totally beginner and forgot that we have some helpful tool like exceptions đ