Java I/O Streams
Questions on Java Input/Output Streams including byte streams (InputStream, OutputStream) and character streams (Reader, Writer), their classes, methods, and hierarchies.
Questions
Into how many groups can the stream class be categorized depending upon the data on which they operate?
- 5
- 4
- 3
- 2
- None of these
Which of the following methods is/are defined in InputStream class of Bytes Stream?
- read(byte[ ] b)
- mark(int limit)
- read()
- both 1 and 3
- all of these
How many subclasses of InputStream class are there?
- 9
- 7
- 8
- 6
- 5
Which of the following methods is/are defined in OutputStream class?
- flush()
- write(byte[ ] b)
- write(byte[ ] b, int offset, int len)
- both 1 and 3
- all of these
How many subclasses of OutputStream class are present in Java?
- 9
- 6
- 5
- 8
- 7
Byte stream are defined by using _____ class hierarchy.
- four
- three
- two
- one
- none of these
Character Stream class is defined by using how many class hierarchies?
- Seven
- Five
- Two
- Four
- None of these
Which of the following is/are the subclasses of OutputStream Class?
- ObjectOutputStream
- PipedOutputStream
- ByteOutputStream
- Both 1 and 2
- All of these
Which of the following methods is/are defined in Reader class?
- skip(long)
- mark(int limit)
- reset()
- both 1 and 3
- all of these
How many subclasses of Reader class are there in Java?
- 9
- 8
- 7
- 6
- 5
Which of the following is/are not the subclasses of Writer class in Java?
- CharWriter
- StringWriter
- BufferedWriter
- Both 1 and 2
- Both 1 and 3
Which of the following is/are not the subclasses of Reader class?
- StringReader
- PipeReader
- InputReader
- Both 1 and 2
- Both 1 and 3
Which of the following methods is/are defined in the File class in Java?
- getPath()
- getName()
- length()
- both 1 and 2
- all of these
How many subclasses of Writer class are there in Java?
- 7
- 6
- 8
- 9
- 5
Which of the following is/are the subclasses of InputStream class?
- StringBufferedInputStream
- FilterInputStream
- SequenceInputStream
- Both 2 and 3
- All of these