0
difference between scanner and bufferedreader
I'm not getting the difference. ...
1 Antwort
0
Scanner class can parse the user input and read int, short, byte, float, long and double apart from String. On the other hand BufferedReader can only read String in Java.
Another difference is that BufferedReader is synchronized while Scanner is not. This means, you cannot share Scanner between multiple threads but you can share the BufferedReader object.