Java I/O Streams

Java I/O byte streams and character streams including InputStream, OutputStream, Reader, and Writer classes

14 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How many subclasses of InputStream class are there?

  1. 9
  2. 7
  3. 8
  4. 6
  5. 5
Question 2 Multiple Choice (Single Answer)

Which of the following methods is/are defined in InputStream class of Bytes Stream?

  1. read(byte[ ] b)
  2. mark(int limit)
  3. read()
  4. both 1 and 2
  5. all of these
Question 3 Multiple Choice (Single Answer)

Which of the following methods are defined in OutputStream class?

  1. flush()
  2. write(byte[ ] b)
  3. write(byte[ ] b, int offset, int len) :-
  4. both 1 and 2
  5. all of these
Question 4 Multiple Choice (Single Answer)

How many subclasses of OutputStream class are present in java?

  1. 9
  2. 6
  3. 5
  4. 8
  5. 7
Question 5 Multiple Choice (Single Answer)

Character Stream class is defined by using _____ class hierarchy.

  1. 7
  2. 5
  3. 2
  4. 4
  5. None of these
Question 6 Multiple Choice (Single Answer)

How many subclasses of Writer class are there in java?

  1. 7
  2. 6
  3. 8
  4. 9
  5. 5
Question 7 Multiple Choice (Single Answer)

Which of the following methods is/are defined in Reader class?

  1. skip(long)
  2. mark(int limit)
  3. reset()
  4. both 1 and 2
  5. all of these
Question 8 Multiple Choice (Single Answer)

How many subclasses of Reader class are there in java?

  1. 9
  2. 8
  3. 7
  4. 6
  5. 5
Question 9 Multiple Choice (Single Answer)

Byte stream are defined by using _____ class hierarchy.

  1. 4
  2. 3
  3. 2
  4. 1
  5. None of these
Question 10 Multiple Choice (Single Answer)

Which of the following is/are not the subclasses of Writer class in java?

  1. CharWriter
  2. StringWriter
  3. BufferedWriter
  4. Both 1 and 2
  5. Both 1 and 3
Question 11 Multiple Choice (Single Answer)

Which of the following is/are not the subclasses of Reader class?

  1. StringReader
  2. PipeReader
  3. InputReader
  4. Both 1 and 2
  5. Both 1 and 3
Question 12 Multiple Choice (Single Answer)

Which of the following is/are the subclasses of the OutputStream class?

  1. ObjectOutputStream
  2. PipedOutputStream
  3. ByteOutputStream
  4. Both 1 and 2
  5. All of these
Question 13 Multiple Choice (Single Answer)

Which of the following is/are the subclasses of InputStream class?

  1. StrinBufferedInputStream
  2. FilterInputStream
  3. SequenceInputStream
  4. Both 2 and 3
  5. All of these
Question 14 Multiple Choice (Single Answer)

The stream class can be categorized into how many groups depending upon the data on which they operate?

  1. 5
  2. 4
  3. 3
  4. 2
  5. None of these