Problems with User Input and the Scanner in Java

preview_player
Показать описание
This video will demonstrate some of the issues you may encounter when using the Scanner for user input. I will also show you how to fix them so they will never be a problem again.
Рекомендации по теме
Комментарии
Автор

Bro, this is not the glitch I was facing, but I'm still learning Java and as a beginner I have created three Scanners "Scanner Input = new Scanner(System.in)" for each method from the class (three methods), and It was showing a couple errors including "NoSuchElementException". After watch this video, I notice that I don't need to create a new scanner for each method in the class, but, with one Scanner input a can use It in 3 different methods to input 3 differente atributes: double, int and double. Thank you so much man, helped me a lot. :, )

juruminhapc
Автор

watched two or three videos about the Scanner class, waiting to be explained exactly this problem but they didn't handled it. But you did it, thank you very much!

mmb-l
Автор

Thank you so much uncle... While doing my project i was suffering a lot because of this glitch but now it's working fine...
Thank you once again...

akashrathod
Автор

Thank you sir, i was trying hard almost 3 hours, finally your video salute to you 🙏

gopinaths
Автор

Perfect way of finding the error and also the explaination is also clear and perfect.

krishnaeaga
Автор

I start learning Java again and this is great to refresh my understanding

calvinshanerodrigues
Автор

Its been 3 years but you just saved my life

KBelZ
Автор

The glitch ks a problem for me since yesterday thankfully I didn't get stressed out and just shutdown my laptop... Thanks for help so glad to see it first.

brioneskristinejoya.
Автор

Thank you very much !! This helped me solve the exception that was occurring. 😇

amritamukherjee
Автор

Thank you for that explanation and also for the solution the other solution was so impractical yet so common, when the program get very big with many inputs and lines like what im working on it becomes a guessing game of where to put that nextLine to consume the \n, this is a much vetter solution and now i dont have to worry about input buffer

gamerzone
Автор

Bro.. THANK YOU SO I've been searching for solution for this problem and you helped me.. Glad I was able to saw this ..

IamEdgePoint
Автор

Thank you so much, you helped me a lot!

prostoymechtatel
Автор

Thanks for the tutorial, very useful. Cheers! <3

JuliDechert
Автор

Thank so much dear it helped me a lot ! ❤️

shivendrasrivastava
Автор

why this glitch doesn't happen in the first two statements?
I mean why just in the last one?

mohamadsaman
Автор

Doesn't work if I'm not using nextLine when I want to use next

Flamgeir
Автор

2022 and still a BIG HELP!!😄😀 ARIGATO!

damukukandu
Автор

Thank you, a lot! Chapter Nine was a few days off.

KJJHN
Автор

This helped me a lot!! Many thanks!! 🙏

cjm
Автор

2 Hours late on my Java project but at least I found the damn solution!

PilaPlanet