Java Pass Argument While Throwing Exception
Chapter:
Exception Handling
Last Updated:
04-09-2016 16:37:08 UTC
Program:
/* ............... START ............... */
public class JavaPassArgumentInException {
public static void main(String args[]) {
try {
throw new Exception("throwing an exception");
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
/* ............... END ............... */
Output
Tags
Pass Argument While Throwing Exception, Exception, Java