-
Exception, Error, RuntimeException and Thowable types can all be thrown using the
throwkeyword. -
Always resist to write a single catchall exception
try {
//some code
} catch (Exception e){
}- Order of catching exceptions : catch bolck of subclasses will be used first, then parent exception class
try{
} catch (FileNotFoundException e){
} catch (IOException e){
} catch (Exception e){
}