fork download
  1. What is the output of this program?
  2.  
  3. class exception_handling {
  4.  
  5. public static void main(String args[]) {
  6.  
  7. try {
  8.  
  9. int a[] = {1, 2,3 , 4, 5};
  10.  
  11. for (int i = 0; i < 6; ++i)
  12.  
  13. System.out.print(a[i]);
  14.  
  15. int x = 1/0;
  16.  
  17. }
  18.  
  19.  
  20. System.out.print("A");
  21.  
  22. }
  23.  
  24.  
  25. System.out.print("B");
  26.  
  27. }
  28.  
  29. }
  30.  
  31. }
  32.  
  33.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
What is the output of this program?
^
1 error
stdout
Standard output is empty