Hi,
I know that Exception is a checked exception.
My question is when I try this code:
import java.io.*;
public class AQuestion2{
public static void main(
String args[]){
System.out.println("Before Try");
try{}
catch(IOException e){
System.out.println("Inside Catch");
}
System.out.println("At the End");
} // end of main
}//end of class
It doesn't compile.
But say we change the catch argument to "Exception", it compiles fine and produces an output.
Isn't that "Exception" is also a checked exception and should not also compile?
What is something that I am missing here?
Thanks!