fork download
  1. class Test
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. try {
  6. int a = 1/0;
  7. } catch (RuntimeException e) {
  8. // division by zero caught here...
  9. e.printStackTrace();
  10. }
  11. }
  12. }
Success #stdin #stdout #stderr 0.1s 320256KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
java.lang.ArithmeticException: / by zero
	at Test.main(Main.java:6)