Computer Applications
Differentiate between Scanner object and BufferedReader object
Input in Java
12 Likes
Answer
Scanner object | BufferedReader object |
---|---|
Scanner class parses the tokens into specific types like short, int, float, boolean, etc. | BufferedReader just reads the stream and does not do any special parsing. |
It is slower than BufferedReader. | It is faster than Scanner. |
It was introduced in JDK1.5 | It was introduced in JDK1.1 |
Answered By
10 Likes
Related Questions
Name the package which can be imported to allow the use of scanner class.
In what way can the following data be read from the scanner object?
(a) Integer type
(b) Float type
(c) Double type
(d) String type
(e) Boolean type
Differentiate between nextFloat( ) and nextDouble( )
Distinguish between the following:
next() and nextLine()