In this video, I have explained about "Getting user input data in Java using scanner class".
The Scanner class is used to get user input, and it is found in the java.util package.
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:
https://bit.ly/2SeDMMr
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
==============================================
▶️ Next Video Link: • P10 - Operators in Java | Core Java |
◀️ Previous Video Link: • P8 - DataTypes in Java | Core Java |
↔️ Java for Absolute Beginners Playlist Link: https://bit.ly/3keRJGa
✴ Checkout my other playlists: https://bit.ly/3gLIAVL
☕ Buy me a coffee: https://bit.ly/33ljBWc
👑 Join my youtube channel to get access to perks:👇
/ @hyrtutorials
==============================================
==============================================
Connect us @
🔗 Website - https://www.hyrtutorials.com
🔗 Telegram - https://t.me/hyrtutorials
🔗 Facebook - / hyrtutorials
🔗 LinkedIn - / hyrtutorials
🔗 Twitter - / hyrtutorials
🔗 Instagram - / hyrtutorials
==============================================
==============================================
🙏 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
Смотрите видео P9 - Getting user input data in Java using scanner class | Core Java | онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь H Y R Tutorials 01 Октябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 24,17 раз и оно понравилось 47 людям.