Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement