fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. try{
  13. int a = Integer.parseInt(args[0]);
  14. int b = Integer.parseInt(args[1]);
  15. System.out.println("a/b=" + (a / b) );
  16. }
  17. System.out.println(e.getMessage());
  18. e.printStackTrace();
  19. }
  20. catch(Exception e){
  21. System.out.println(e.getMessage());
  22. e.printStackTrace();
  23. }
  24. finally{
  25. System.out.println("プログラム終了");
  26. }
  27.  
  28. }
  29. }
  30.  
  31.  
Success #stdin #stdout #stderr 0.06s 54852KB
stdin
java Ideone 5 2
stdout
Index 0 out of bounds for length 0
プログラム終了
stderr
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
	at Ideone.main(Main.java:13)