Sounds as if a trip to the
Java Tutorials would be profitable.
You can do three things with a potential Exception.
Ignore it. This is only an option with unchecked Exceptions.Handle it. This is usually done with "try-catch."Declare that you are not handling it. This is done with "throws."You must do one of those three things; since Exception is checked, the "ignore it" option is no longer available, so you must handle it or declare it.
The main . . . throws Exception (not exception) declaration tells the compiler that you have decided not to handle that Exception in your main method (whether it arose in the main method or elsewhere), so the JVM has to handle it. If you look in Bruce Eckel
Thinking in Java you find the JVM does two things then:
Print a stack trace.Terminate the Thread the Exception arose in. If it is a single-threaded application the whole application terminates.