Difference between DataInputStream and BufferedReader


Difference between DataInputStream and BufferedReader

<<Previous   Next>>

Java - Difference between DataInputStream and BufferedReader - March 16, 2010 at 15:05 PM by Vidya Sagar 

Difference between DataInputStream and BufferedReader

The differences are:

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. 

<<Previous   Next>>
Explain the methods that control a Applet's on-screen appearance, update and paint.

To refresh a page in an applet window without flashing, the update() method is to be overridden. It clears the background of the component, before invoking paint()..................

Explain with an example how a class implements an interface.

When a class implements an interface, it has to implement the methods defined inside that interface. This is enforced at build time by the compiler..........................


Write your comment - Share Knowledge and Experience


Interview questions
Home | About us | Sitemap | Contact us