-
Exception
When super class method throws exception then subclass also throws the same Exception, which will compile?
-
Exception Handling
What is the output of the following program, When tested under JDK 5.0class ExceptionDemo{ public static void main(String[] args) { int a[] = new int[] {1,2,3,4,5}; try{ System.out.prinltln(a[6]); } catch(Exception e) { System.out.println("Catching Exception ..."); } catch(ArrayIndexOutofBoundsException ae) { System.out.println("Catching ArrayIndexOutOfBounds...
-
What is the difference between exception and error
Answered by Scott on 2005-05-12 09:50:36: An Exception can be caught and recovered: ArrayIndexOutOfBoundsException means you tried to access a position of an Array that does not exist - no big deal. An Error is unrecoverable: OutOfMemoryError means that the JVM has no more memory to contin