IO Overview Self Test With Answers



1) Basic Multilingual Plane 10646 is synonomous with which of the following?

a) ASCII
b) ISO-8859-1
c) UCS-2
d) UCS-4                                                           ( d )

2 ) Which of the following is a  16-bit stream

a) ASCII
b) ISO-8859-1
c) Unicode
d) UCS-4                                                              ( c )

3 )  The primary reason the io package was made bigger was

a) to add new functionality to the package
b) to overcome problems that arose in translating some of the character sets
c) to make it easier to use
d) to accomodate new developments in character set technology.      ( b )

4) Pick the incorrect statement. IO Classes get their names from

a ) whether they handle byte or String type.
b)  the width or the streams they handle, one or two bytes
c)  where the stream is being sent or taken from or what they do
d)  what direction the stream is going, whether being read or written.    ( a )

// Comment: a ) seems right at first glance because the Reader Writer classes
// are character based but the streams technically are based on dealing with byte
// or char type.

5) Which of the following statements is not correct?

a) InputStream, OutputStream, Reader & Writer are all abstract classes.
b) Generally the exception that must be caught when using io classes is the
     IOException.
c) Both 8-bit and 16-bit abstract io superclasses have methods defined to
    read and write arrays.
d) 16-bit abstract io superclasses have methods defined to read and write
     String type.                                                                                      ( d )

// Comment: The Writer has a method to write a String but the reverse is not
// true. There is no read method that takes a String type in the Reader class.

6 )  True or False. System.out and System.in represent static instances of
  different classes.        ( True )