Java - Custom Exceptions
Identify the error in the following code snippet that throws a custom exception:
class MyException extends Exception {}
public class Demo {
public static void test() {
throw new MyException();
}
}