filmov
tv
P9 - Getting user input data in Java using scanner class | Core Java |
![preview_player](https://i.ytimg.com/vi/b9i-yId8GxI/maxresdefault.jpg)
Показать описание
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
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
Комментарии