Java I/O Streams
Questions covering Java byte streams, character streams, and file handling classes
Questions
The stream class can be categorised into how many groups depending upon the data on which they operate?
- 6
- 5
- 4
- 3
- 2
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 the above
How many subclasses are there of the InputStream class?
- 9
- 8
- 7
- 6
- 5
How many subclasses of the OutputStream Class are present in Java?
- 9
- 6
- 5
- 8
- 7
Which of the following methods is/are defined in the OutputStream class?
- flush()
- write(byte[ ] b)
- write(byte[ ] b , int offset, int len)
- Both (1) and (3)
- All of the above
Byte stream are defined by using _____ class hierarchy.
- 5
- 4
- 3
- 2
- 1
Character Stream class is defined by using _____ class hierarchy.
- 7
- 5
- 2
- 4
- None of these
Which of the following methods is/are defined in the Reader class?
- skip(long)
- mark(int limit)
- reset()
- Both (1) and (3)
- All of the above
Which of the following is/are the subclasses of the OutputStream Class?
- ObjectOutputStream
- PipedOutputStream
- ByteOutputStream
- Both (1) and (2)
- All of the above
Which of the following is/are not the subclasses of the 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 the 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 the above
How many subclasses of the Reader Class are there in Java?
- 9
- 8
- 7
- 6
- 5
Which of the following is/are the subclasses of the InputStream Class?
- StrinBufferedInputStream
- FilterInputStream
- SequenceInputStream
- Both (2) and (3)
- All of the above
How many subclasses of the Writer class are there in Java?
- 7
- 6
- 8
- 9
- 5