Why compiler ignores input of string after input of integer or double! || Java tutorial #1

preview_player
Показать описание
why java code for input of string is not showing result on screen while compiling it .
This java code is error-free but not showing required result ! according to given instruction to it.


Why compiler ignores input string code while compiling in java , after input of int or double in the java code , it ignores the input of string , when you write for input after writing input of int or double .
Рекомендации по теме
Комментарии
Автор

The reason is simple, it is because of an escape sequence (\n) that stays in the buffer (from the int or double) that occupies the string input, thus ignoring the input from the user. When a dummy input line is given, the escape sequence nullifies that dummy and our actual input line works fine.

arnabbanik
Автор

If you explain like this always students feel like we learn any wrong 😢

gm_
Автор

thanks sir you help me to have a good sleep
no one else you can help us when while facing this weird problem

QuizFires
Автор

Thanks bro it really helped I was trying a lot but still it was not printing thanks for the video

Anik__
Автор

Thanks alot my friend you remove me from a mud.

imranahmad
Автор

thank you very much thought i had no hope for a minute there

orionwarawa
Автор

I didn't understand properly please can you explain in comment??

Subah-To-N
Автор

Please explain in hindi if you are not comfortable with english. Its your mother tongue. What shy speaking it?

deepikagill
join shbcf.ru