0% found this document useful (0 votes)
200 views3 pages

Quiz On IO Streams

This quiz contains 10 multiple choice questions about IO streams in Java. The questions cover topics like common IO packages in Java, data flow direction in streams, connecting running programs with pipes, connecting streams together, buffers, stream transformations, byte streams vs character streams, abstract base classes for readers and writers, and character data formats in Java programs vs text files. The quiz results are for practice only and do not count toward the user's grade.

Uploaded by

dash hunters
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views3 pages

Quiz On IO Streams

This quiz contains 10 multiple choice questions about IO streams in Java. The questions cover topics like common IO packages in Java, data flow direction in streams, connecting running programs with pipes, connecting streams together, buffers, stream transformations, byte streams vs character streams, abstract base classes for readers and writers, and character data formats in Java programs vs text files. The quiz results are for practice only and do not count toward the user's grade.

Uploaded by

dash hunters
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Quiz on IO Streams

This is a practice quiz. The results are not recorded anywhere and do not affect
your grade. The questions on this quiz might not appear in any quiz or test that
does count toward your grade.

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
b.    java.io
c.    java.inout
d.    java.file

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


a.    No; a stream has one direction only, input or output.
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

You might also like