how to create object of the scanner class
Answers
Answered by
1
Answer:
To create an object of Scanner class, we usually pass the predefined object System.in, which represents the standard input stream. ...
To read numerical values of a certain data type XYZ, the function to use is nextXYZ(). ...
To read strings, we use nextLine().
To read a single character, we use next().
Similar questions