0
Multiple inputs dont work in my code on "CODE PLAYGROUND"
Can someone help me realize multiple inputs in my code (https://code.sololearn.com/cigHoiGI6Xip). Maybe I made some mistake in code. Spliting inputs on different lines dont work in my case. FOr example: first line - I entered "5" second line - I entered "10" Inputs from first line is work, but second value have null value. Thank you in advance.
3 Answers
+ 1
The issue is the fact that you have two scanner objects. That wonāt effectively compute on an online compiler.
To make it work:
Remove the declaration of the second scanner named āscā and use your first scanner object named āscannerā for both blocks (youāll need to move the declaration of āscannerā outside of the method body, like to the top of the password class for example)
+ 3
Thank you, Jake! Your advice help me. Now everithing works.
+ 1
Please put the link to your code in the body of your question. If it is in the tags we cannot use the link.