posted 17 years ago
"cannot catch an exception unless it is thrown in try block"
try
{
}
catch(FileNotFoundException)
{
}
//gives compiler error.
but you can catch a super class exception which is not thrown in try block.
try
{
}
catch(Exception)
{
}
// no compiler error
what are all the super class exceptions?
whether i should know all the exceptions for the exam (1.4)