public class ThrowsDemo {
 public test(){
  ThrowsSample t = new ThrowsSample();

  try {
   t.foo();
  } catch (ArgErr e){
   e.printStackTrace();
   throw new RuntimeException(e.toString());
  } catch (MemErr e){
   e.printStackTrace();
   throw new RuntimeException(e.toString());
  } catch (IOErr e){
   e.printStackTrace();
   throw new RuntimeException(e.toString());
  } catch (Exception e){
   e.printStackTrace();
  }
 }
}