hai iam learning java now
i have doubt in java exception handling
when we create our own exceptions what we are doing is declare our own exception class and make it as subclass of Exception class.Here is a sample program.This is ok.
Here is another version of creating our own exception class using Throwable class
In this program instead of making class myexception1 as subclass of throwable ,an object of throwable class is created and the program is executed correctly.How it could correct workly with out declaring class myexception1 as subclass to Throwable class.
what is the difference between the above two programs?
please help me.
Thanks in advance.
|All times are GMT +5.5. The time now is 02:16.|