Skip to content

Instantly share code, notes, and snippets.

@frsyuki
Created December 19, 2014 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frsyuki/d4dee313a475e36c17fe to your computer and use it in GitHub Desktop.
Save frsyuki/d4dee313a475e36c17fe to your computer and use it in GitHub Desktop.
public class X {
public static void main(String[] args) {
System.out.println("doit: "+doit());
}
public static int doit() {
try {
System.out.println("try");
throw new RuntimeException("exception");
} finally {
System.out.println("finally");
return 1;
}
}
}
// [frsyuki@xcore ~]$ javac X.java
// [frsyuki@xcore ~]$ java -cp . X
// try
// finally
// doit: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment