Do exercise 16.2 on pages 315-317. As a clarification regarding the three declarations at the bottom of page 317: the goal is that in each case, you would leave everything to the left of the equal sign unchanged and would replace the stuff to the right of the equal sign.
Exercise 17.x1: For each of the following two Java statements, indicate whether it is legal, and if so, explain under what circumstances each exception handler would execute. The first version is
try { System.in.read(); } catch(java.io.CharConversionException e2){ System.err.println("Caught a CharConversionException."); } catch(java.io.IOException e1){ System.err.println("Caught an IOException."); }
and the second version is
try { System.in.read(); } catch(java.io.IOException e1){ System.err.println("Caught an IOException."); } catch(java.io.CharConversionException e2){ System.err.println("Caught a CharConversionException."); }
Do exercise 18.1 on page 383.
Do exercise 18.6 on page 384.