What is the difference between DataInputStream and
BufferedReader
Answer Posted / a
The DataInputStream works with the binary data, while the
BufferedReader work with character data.
All primitive data types can be handled by using the
corresponding methods in DataInputStream class, while only
string data can be read from BufferedReader class and they
need to be parsed into the respective primitives.
DataInputStream is a part of filtered streams, while
BufferedReader is not.
DataInputStream consumes less amount of memory space being
it is binary stream, where as BufferedReader consumes more
memory space being it is character stream.
The data to be handled is limited in DataInputStream, where
as the number of characters to be handled has wide scope in
BufferedReader.
| Is This Answer Correct ? | 28 Yes | 1 No |
Post New Answer View All Answers
I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com
What is the current version of java?
What are the basic concepts of OOPS in java?
What is a substring of a string?
Give a practical example of singleton class usage?
Can sleep() method causes another thread to sleep?
How concurrent hashmap works?
What are the 6 mandatory procedures for iso 9001?
What are different access specifiers in java? Explain
What is nested loop? What is dangling else condition in it?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
Is integer a class?
What is garbage collector?
Can we define package statement after import statement in java?
What are the benefits of java?