+ 1

When BufferedReader and StringBuffer is used in java?

23rd Mar 2017, 9:24 AM
swara
2 Respuestas
+ 6
Buffered reader is just like Scanner, used to get user input. StringBuffer is used for changeable strings
23rd Mar 2017, 9:37 AM
Meharban Singh
Meharban Singh - avatar
+ 1
IO operations are always costlier .Rather than read one character at a time from the network or disk, the BufferedReader reads a large block at a time. That makes it faster. BufferedReader simply reads sequence of characters. StringBuffer is used to create mutable string. As you know String in Java is immutable.
23rd Mar 2017, 9:53 AM
Bhabesh Gogoi
Bhabesh Gogoi - avatar