Scanner cleaning in java | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Scanner cleaning in java

hello, I am writing a program with java and i have run with while use Scanner to get user input and I pass the input to another Class method. I made a while loop that repeat the method if it return "false" and after the first time that I pass the scanned Input to the method i have 2 cases, the first is the scanner scan "space" or /n; and if I am cleaning the budder with ScannerName.next() its stock. thanks for helps!

30th Aug 2020, 10:37 PM
Niv Eliyahu
Niv Eliyahu - avatar
2 Réponses
+ 4
People can't help with screenshot of partial code, it is not easy to edit or debug with. A full rewrite of it is even more difficult based on screenshots. I recommend you to save a copy of your code here in SoloLearn, and share a link to the saved code within your thread Description above. That way people can try to run and analyse it, and suggest you a workaround. Follow the below guide to sharing links 👇 https://www.sololearn.com/post/75089/?ref=app
31st Aug 2020, 12:21 AM
Ipang
0
attached screenshot of part of my program. https://imgur.com/GHPgpOl
30th Aug 2020, 10:40 PM
Niv Eliyahu
Niv Eliyahu - avatar