Java / Exception
How to create unchecked exception in Java?
If the custom exception needs to be unchecked, then have the user defined exception class extend RuntimeException.
public class UserDefinedException extends RuntimeException { UserDefinedException(String msg) { super(msg); } }
More Related questions...