Created
May 19, 2011 15:35
-
-
Save skyler/981053 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class T { | |
public static void main(String[] args) | |
{ | |
T t = new T(); | |
try { | |
throw t.exception; | |
} catch (IOException ioe) { | |
System.out.println("caught IO!"); | |
} catch (NumberFormatException nfe) { | |
System.out.println("caught NumberFormatException!"); | |
} catch (Exception e) { | |
System.out.println("caught base!"); | |
} | |
} | |
public Exception exception; | |
void testMe() | |
{ | |
exception = new NumberFormatException("I am an NFE"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment