Header Ads

  • Breaking Now

    What is a user-defined exception?

    For every project you implement you need to have a project dependent exception class so that objects of this type can be thrown so in order to cater this kind of requirement the need for user defined exception class is realized.
    for example:

    class MyException extends Exception{
    public MyException(){};
    public MyException(String msg){
    super(msg);
    }

    Post Top Ad

    Post Bottom Ad