Using the Java Scanner Class - next, nextInt, nextDouble & nextLine

Published: 09 June 2023
on channel: Logic Lambda
846
16

This video goes over how to use the Java Scanner class, including some common mistakes

0:10 - Instantiating a Scanner object
0:44 - Reading in a String using next()
1:26 - Reading in an integer (int) using nextInt()
2:02 - Reading in a floating point number (double) using nextDouble()
2:39 - Reading integers as ints vs Strings
3:03 - Reading a String with whitespace with nextLine()
3:58 - Handling the newline character that is generated when Enter is pressed


On this page of the site you can watch the video online Using the Java Scanner Class - next, nextInt, nextDouble & nextLine with a duration of hours minute second in good quality, which was uploaded by the user Logic Lambda 09 June 2023, share the link with friends and acquaintances, this video has already been watched 846 times on youtube and it was liked by 16 viewers. Enjoy your viewing!