When should checked exception/unchecked exception be chosen?
问题 I have learned from various tutorial that "If a client can reasonably be expected to recover from an exception, make it a checked exception. If a client cannot do anything to recover from the exception, make it an unchecked exception." I really want to see the effectiveness of previous statement through some code examples. e.g. try { br.readLine(); } catch (IOException e) { e.printStackTrace(); } Here, IOException is checked Exception.So, how I'm supposed to recover when this Exception occurs