syntax to try,catch and finally block:-
try
{
set of
exe sts;
.
.
if(condition)
throw
new classname();//optional
throw
new classname("args");//optional
.
}
catch(childclassname oname)
{
.
}
.
catch(baseclassname oname)
{
………..
}
finally
{
write
statements;
}
No comments:
Post a Comment