Presentation is loading. Please wait.

Presentation is loading. Please wait.

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,

Similar presentations


Presentation on theme: "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,"— Presentation transcript:

1 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!”);

2 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)

3 Exercise 11.3 try { // some code } catch (Exception e) {}
Explain what is wrong with the following try { // some code } catch (Exception e) {}

4 Exercise 11.4 Critique the following and compare to the previous exercise public static void main (String[] args) throws Exception


Download ppt "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,"

Similar presentations


Ads by Google