That's because the "class A" has a constuctor which throws an exception, so when some class extends this class, in this case the "class Test9", you have to deal with this exception in the constructor of the class which extends, so that when you call the Test9's constructor, it will call the super's constructor which throws an exception, that must be caught or thrown by the Test9's constructor. And about the main method, when you throw an exception within a main method, there's nobody else who will be able to catch the exception, so the exception will not be caught.
When a superclass constructor has a non-empty throws clause, subclasses must define an explicit constructor with an appropriate throws clause, as a default constructor has no throws clause. (This is stated in JLS 2e 8.8.7, ruling out the xxxxx alternative of copying the superclass constructor's throws clause.
Currently, the compiler generates a default constructor with an empty throws clause, and then generates an error message. Unfortunately, the offending call, the implicit call to the superclass constructor, does not appear in the program text, so the message is confusing.