say I have the following
try{ //something }catch(Exception generic){ //catch all }catch(SpecificException se){ //catch specific exception only }
This does not compile with eclipse compiler:
Unreachable catch block for IOException. It is already handled by the catch block for Exception
So define them the other way. Only the specific one will be caught.