Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

why bufferedreader is faster than scanner

Difference between BufferedReader and Scanner are following:

BufferedReader is synchronized but Scanner is not synchronized.
BufferedReader is thread safe but Scanner is not thread safe.
BufferedReader has larger buffer memory but Scanner has smaller buffer memory.
BufferedReader is faster but Scanner is slower in execution.
Code to read a line from console:
 
PREVIOUS NEXT
Tagged: #bufferedreader #faster #scanner
ADD COMMENT
Topic
Name
1+2 =