void foo() throws HogeException {
 throw new HogeException();
}

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

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