How does one decide to create a checked excpetion or an unchecked exception [duplicate]
问题 This question already has answers here : Understanding checked vs unchecked exceptions in Java (21 answers) Closed 3 years ago . I want to know how does one know to create and throw a checked exception or an unchecked exception. For example I have a service which takes some data and validates it before using it. During validation a certain field did not meet the rules and I want to throw an exception say ValidationException(). How will I know of decide it should be checked or unchecked. In