ariestamirra

excer1

May 22nd, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. package Percobaan;
  2.  
  3. public class Exercise1 {
  4.  
  5.     static void f1() {
  6.         System.out.print("1");
  7.         try {
  8.             System.out.print("2");
  9.             f2();
  10.             System.out.print("3");
  11.         } catch (Exception e) {
  12.             System.out.print("4");
  13.         } finally {
  14.             System.out.print("5");
  15.         }
  16.         System.out.println("6");
  17.     }
  18.  
  19.     static void f2() throws Exception {
  20.         if (true) {
  21.             throw new Exception();
  22.         }
  23.     }
  24.  
  25.     public static void main(String s[]) {
  26.         f1();
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment