What is the difference between DataInputStream and
BufferedReader

Answer Posted / rama

An important difference between the ...Stream classes and
the ...Reader/...Writer classes is that streams work with
binary data (in other words, raw bytes), while readers and
writers work with character data. In going from one to the
other there's always an encoding or decoding of data
involved.

The en-/decoding step can't be done in a meaningful way
unless one knows what encoding was used. Common encodings
are US-ASCII, UTF-8 and other Unicode variants, MacRoman,
ISO-8859-1 and CP1252. Furthermore, each platform (Windows,
Linux, OS X, ...) has its own default encoding, so if no
encoding is specified, the JVM will choose one - which may
well be the wrong one.

Is This Answer Correct ?    8 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the importance of import keyword in java?

527


What is the relationship difference the canvas class and the graphics class?

561


Which collection is ordered in java?

535


What is use of super keyword?

567


Can we override the overloaded method?

566






What are the restriction imposed on a static method or a static block of code?

595


What is the difference between jvm and jre? What is an interface?

553


when to use ArrayList and when to use HashMap in webApplication.

3889


How does finally block differ from finalize() method?

589


Which is dependent variable?

494


Can we define constructor in inner class?

544


Does constructor creates the object ?

586


How does class forname work in java?

482


Which is illegal identifier in java?

590


What does next mean in java?

540