public class ThrowException { public static void main(String[] args) { try { foo(); } catch(Exception e) { if (e
static void foo() throws IOException { throw new IOException("your message"); }