User defined exception are checked or unchecked exceptions

前端 未结 5 2068
后悔当初
后悔当初 2021-01-21 07:52

In my web application created a User defined exception extends with Exception.Is it Checked or unchecked exception

public class InvalidDataException extends Exc         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-21 08:43

    Only those exceptions that are subclasses of RuntimeException are considered unchecked.

    Yours isn't, and therefore is a checked exception.

提交回复
热议问题