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
What is functional interface in java example?
What purpose do the keywords final, finally, and finalize fulfill?
What is immutable in java?
Does google use java?
Explain the importance of finalize() method.
Is null a keyword in java?
What makes a function well defined?
Is passing by reference faster?
How to implement a multithreaded applet?
Variables used in a switch statement can be used with which datatypes?
How many types of string data types are there?
Why is stringbuffer thread safe?
Can I extend singleton class in java?
Can you explain inner class.
What is jit and its use?