revised: 10/05/03,11/07/2012

I/O Stream on IO Streams

Instructions: For each question, choose the single best answer. Make your choice by clicking on its button. You can change your answers at any time. When the quiz is graded, the correct answers will appear in the box after each question.

1. The input/output package usually used with Java is:

A.    java.input


C.    java.inout

D.    java.file

2. Can data flow through a given stream in both directions?

A.    No; data in a stream flows in only one direction.

B.    No; streams only work for output.

C.    Yes; only one stream is needed to read and write a file.

D.    Yes; but only one direction at a time.

3. What is the name of a stream that connects two running programs?

A.    Program stream

B.    Conduit

C.    Pipe

D.    Channel

4. Can a stream act as a data source for another stream?

A.    No. Streams must be connected directly to physical devices.

B.    No. Streams do not deal with data.

C.    Yes. Some streams can be connected together.

D.    Yes. An input stream can be connected to an output stream.

5. What is a buffer?

A.    A section of memory used as a staging area for input or output data.

B.    The cable that connects a data source to the bus.

C.    Any stream that deals with character IO.

D.    A file that contains binary data.

6. What is a stream that transforms data in some way called?

A.    Processing stream.

B.    Transformer.

C.    UTF stream.

D.    Pipe

7. A stream that is intended for general purpose IO, not usually character data, is called...

A.    Reader

B.    Writer

C.    Byte Stream

D.    Character Stream

8. What is the name of the abstract base class for streams dealing with character input?

A.    InputStream

B.    OutputStream

C.    Reader

D.    Writer

9. Is the character data used inside a Java program exactly the same format as the character data in a text file written by Java?

A.    No. Internally Java uses 8-bit character data, but text files always use ASCII.

B.    No. Internally Java programs always use 16-bit char data; but text files are written in UTF format, which is different.

C.    Yes. Java uses the same format for characters inside a program and in text files.

D.    Yes. Character data has always used the same format for all computers and all files.

10. What is the name of the abstract base class for streams dealing with general purpose (non-character) input?

A.    InputStream

B.    OutputStream

C.    Reader

D.    Writer

The number you got right:       Percent Correct:       Letter Grade:   

Click here If you have returned here from another page, or have re-loaded this page, you will need to click again on each of your choices for the grading program to work correctly. You may want to press the SHIFT KEY while clicking to clear the old answers.