void print(int n) {
 System.out.println(n);
}

void foo() throws HogeException {
 print(100);  // 実行される
 throw new HogeException(); // 例外を発生、foo()の外に例外が投げられる
 print(200); // 実行されない
}

void hoge() throws HogeException
{
 try {
  print(1); // 実行される
  foo();  // foo()から例外発生でcatchへジャンプ
  print(2); // 実行されない
 } catch (HogeException e) {
  print(3); // 実行される、print(4)へ続く 
 }
 print(4); // 実行される
 foo();  // foo()から例外発生、hoge()の外に例外が投げられる
 print(5); // 実行されない
}