I am trying to create a custom exception class but having trouble naming. Here’s what I have so far:
public class MyException extends Exception {
public MyException() {
}
}
Now, I want an exception that is not called MyException. Can I use:
public void EmptyException() {
}
Thank you for your help.
yes ofcourse, just do the same thing again 🙂
create a new class called EmptyException
in same class: