we can
write set of executable sts within a try block which should be follwed by
atleast one catch block or finally block.
try
block can have more than one catch blocks.
if an
exception is occured by a statement within a try block , then corresponding
instance is created and which will be thrown to corresponding catch block.
we can
also throw an exception explicitly using the keyword "throw".
even
exceptions are handled or not, the statements within a finally block will be
executed.
we can
throw checked exceptions using the keyword "throws".
constructor of class Exception:-
Exception();
Exception(String);
method:-
public String getMessage();
No comments:
Post a Comment