| Author |
Doubt in Exceptions.....
|
Manoj Mani
Ranch Hand
Joined: Mar 31, 2007
Posts: 65
|
|
class Apple { public void m1() throws SecurityException { System.out.println("I want more apple"); } } public class Orange extends Apple { public void m1() throws SecurityException { System.out.println("I want more Orange"); } public static void main(String [] args) { Orange p = new Orange(); p.m1(); } } Now if we change SecurityException either by IOException,Exception etc...we will get an error... Can anybody give the complete hierarchy of the Checked,Unchecked Exceptions(Better,give the complete hierarchy starting from Throwable)..
|
Impossible Is Often Untried.Its Time For Us To Change....
|
 |
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
|
|
There are hundreds of exceptions and for exam absolutely not necessary to know them all. If it really matters which exception inherits Exception class and which specifically inherits RuntimeException exam will surly tell us except the exceptions we must know. I can give you the listings of them:
Did I miss any Exception? Regards, cmbhatt
|
cmbhatt
|
 |
Tina Tibrewal
Ranch Hand
Joined: Apr 19, 2007
Posts: 40
|
|
This is from complete reference: Unchecked Exceptions: ArithmeticException ArrayIndexOutOfBoundsException ArrayStoreException ClassCastException IllegalArgumentException IllegalMonitorStateException IllegalStateExceptionIllegalThreadStateException IndexOutOfBoundsException NegativeArraySizeException NullPointerException NumberFormatException SecurityException StringIndexOutOfBounds UnsupportedOperationException Checked Exception ClassNotFoundException CloneNotSupportedException IllegalAccessException InstantiationException InterruptedException NoSuchFieldException NoSuchMethodException Hope that helps.
|
 |
 |
|
|
subject: Doubt in Exceptions.....
|
|
|