Analyze the following code:
class Test {
public static void main(String[] args)
| System.out.println("Welcome to Java"); |
}
}
class MyException extends Error {
}
◦ You should not declare a class that extends Error, because Error raises a fatal error that terminates the program.
◦ You cannot declare an exception in the main method.
◦ The program has a compilation error.
◦ You declared an exception in the main method, but you did not throw it.