28) A method that uses the Scanner class to obtain input does not require either catching or
throwing an IOException. This is because
A) the Scanner class does not call upon any classes that throw checked exceptions
B) the Scanner class’ methods call input methods in try statements and catch IOExceptions so
that they are handled directly in the Scanner class
C) the Scanner class uses JOptionPane dialog boxes instead of java.io classes so that it does not
have to deal with IOExceptions
D) the Scanner class overrides the class IOException making it an unchecked exception
E) none of the above, methods do require handling IOException even if thrown by a method in a
Scanner class
29) The showDialog method is part of which class?
A) JOptionPane
B) JColorChooser
C) JTextArea
D) Scanner
E) all of the above
30) PrintWriter is a better output stream class that PrintStream because PrintWriter
A) has both print and println methods and PrintStream only has print
B) can output both byte and character streams and PrintStream can only output byte streams
C) has error checking mechanisms as part of the class and PrintStream does not
D) will not throw checked exceptions and PrintStream will
E) all of the above
31) The difference between a checked and an unchecked exception is
A) checked exceptions need not be listed in a throws clause
B) unchecked exceptions must be listed in a throws clause
C) neither kind of exception follows the rules of exception propagation
D) an unchecked exception requires no throws clause
E) a checked exception always must be caught by a try block; an unchecked exception does not