Exercise 11.1 Write a code fragment that performs the same function as the statement below without using the crash method Toolbox.crash(amount < 0, “A negative amount!”);
Exercise 11.2 Locate the error and specify if it is compile-time, runtime, or logic try { // some code } catch (java.io.IOException e) catch (java.io.FileNotFoundException e)
Exercise 11.3 try { // some code } catch (Exception e) {} Explain what is wrong with the following try { // some code } catch (Exception e) {}
Exercise 11.4 Critique the following and compare to the previous exercise public static void main (String[] args) throws Exception