Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Core Java - Interview Questions and Answers for 'Reader' - 5 question(s) found - Order By Newest | ||||
| ||||
Ans. The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented | ||||
Sample Code for InputStream Sample Code for OutputStream | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   file io   streams   reader class   writer class   inputstream   outputstream   stream  file handling | ||||
| ||||
Ans. FileReader | ||||
Sample Code for FileReader | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   io   file   fileio   filereader  file handling | ||||
| ||||
Ans. http://www.buggybread.com/2015/01/java-input-reader-classes-and-interfaces.html | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   input output   io   reader | ||||
| ||||
Ans. Scanner is used for parsing tokens from the contents of the stream while BufferedReader just reads the stream. BufferedReader read files efficiently by using a buffer to avoid physical disk operations. Buffer size of Scanner is usually smaller than the Buffered Writer. BufferedReader is faster that Scanner as it just reads the Stream and doesn't Parse the tokens to read the stream into primitive data types. | ||||
Sample Code for Scanner Sample Code for BufferedReader | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   file io   input output   scanner   bufferedreader  file handling | ||||
| ||||
Ans. Which group of bytes represent which character is defined by character encoding. So when reading character by character from a stream of bytes using Reader, specifying character encoding becomes significant as the same group of bytes can represent different character in different character encoding(Eg UTF-8 and UTF-16 etc.) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  File io  File handling  Reader  Writer  Stream Asked in 1 Companies | ||||