Understanding checked vs unchecked exceptions in Java

Joshua Bloch in “Effective Java” said that Use checked exceptions for recoverable conditions and runtime exceptions for programming errors (Item 58 in 2nd edition) Let’s see if I understand this correctly. Here is my understanding of a checked exception: try{ String userInput = //read in user input Long id = Long.parseLong(userInput); }catch(NumberFormatException e){ id = … Read more