Presentation is loading. Please wait.

Presentation is loading. Please wait.

Code Magnets problem for wk5

Similar presentations


Presentation on theme: "Code Magnets problem for wk5"— Presentation transcript:

1 Code Magnets problem for wk5
System.out.print(“r”); Try { System.out.print(“t”); doRisky(test); } finally { System.out.print(“s”); System.out.print(“o”); Class MyEx extends Exception { } Public class ExTestDrive { System.out.print(“w”); If (“yes”.equals(t)) {

2 Code Magnets problem for wk5 (cont)
System.out.print(“a”); throw new MyEx(); } catch (MyEx e) { Static void doRisky(String t) throws MyEx { System.out.print(“h”); Public static void main (String [] args) { String test = args[0]; Output: Java ExTestDrive yes thaws Java ExTestDrive no throws


Download ppt "Code Magnets problem for wk5"

Similar presentations


Ads by Google