P9 - Getting user input data in Java using scanner class | Core Java |

preview_player
Показать описание
In this video, I have explained about "Getting user input data in Java using scanner class".

To use the Scanner class, create an object of the class and use any of the available methods found in the Scanner class documentation. In our example, we will use the nextLine() method, which is used to read Strings:

You can find the program used in this video at the below location:

Scanner class provides a few other methods to read different type of data, those are listed below:
nextBoolean() : Reads a boolean value from the user
nextByte() : Reads a byte value from the user
nextDouble() : Reads a double value from the user
nextFloat() : Reads a float value from the user
nextInt() : Reads a int value from the user
nextLine() : Reads a String value from the user
nextLong() : Reads a long value from the user
nextShort() : Reads a short value from the user

==============================================

👑 Join my youtube channel to get access to perks:👇

==============================================
==============================================
Connect us @
==============================================
==============================================
🙏 Please Subscribe🔔 to start learning for FREE now, Also help your friends in learning the best by suggesting this channel.

#hyrtutorials #java #corejava
Java programming by Yadagiri Reddy
Рекомендации по теме
Комментарии
Автор

Simply no words for your fantastic presentation 🎉🎉🎉

kishorebadavath
Автор

The 26 letters in an alphabet cannot describe how good your explanation is....🤗🤗

swapnabandi
Автор

Anna1000 likes kottina takkuvey anna mee videos ki super anna❤

skvali
Автор

As you mentioned its absolute, its so true. I wish I have known this channel earlier. I liked the way you explain....
Do you have any videos for collections in Java and can you pass some good info to study. 🙏🙏🙏

kavitha-
Автор

Master ji...nenu mana channel lo vunna java videos choosanu chaalaa bagunnayi ...pls keep upload videos anna it will very useful for us.

srptelugu
Автор

With the reference of kips learning, In if statement and if else statement i didn't see any closing of scanner method.Is it okay leave it like that.

Unknown_
Автор

Superb video sir very nice and clear explanation🙏

mounikakataboina
Автор

even after importing java, util package i am still getting error
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Scanner cannot be resolved to a type
Scanner cannot be resolved to a type

at

BellapuSindhu
Автор

Sir... For output stream we directly writting like But for input stream why we r creating object "new"

Ayeshu
Автор

even after imported java.util for scanner program it is throwing this error

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Scanner cannot be resolved to a type
Scanner cannot be resolved to a type

at
I am using java 11

BellapuSindhu
Автор

Remaining topics kuda upload cheyandi brother.

renukav
Автор

I am Getting error at the time of output that is i am able to print only two outputs more than that not able to run the output

sasidharch
Автор

Why can't we define IMPORT in class? Why are we defining it in package ?

SaicharanDasari
Автор

it is really good.
but where it is used in real Testing scenarios?
please give some real examples.

vigneshsivan