how to create a custom checked exception? - java
Now, that you are sure that you really do want a create a custom Exception class we will begin writing the actual program. To create a custom checked exception, we have to sub-class from the java.lang.Exception class. And thatâs it! Yes, creating a custom exception in java is simple as that!