Howdy,
Here's one way to think about the implications:
If your superclass constructor declares an exception, your subclass constructor must also declare that exception.
What does this actually mean? Several things...
1) You MUST write a constructor in your class! You can't just allow for the compiler to insert the default constructor, because you must have a place to declare the exception.
class Foo {
Foo() throws FooException { }
}
class Bar extends Foo {
Bar() throws FooException { } // we MUST have this
}
In this example, even though we don't *need* a constructor in Bar for any other reason (in other words, we don't need any code in our constructor) we must still put in the constructor just so that we have a place to declare the exception!
2) Constructors are an EXCEPTION to the "Handle or Declare" law
(sorry about the overloaded use of the
word 'exception'

)
With constructors, there is no option to "Handle" -- you can ONLY declare. Because, where would you *put* the try/catch?
class Bar extends Foo {
Bar() {
try {
super();
} catch (FooException fe) { } // will not work!
}
}
You already KNOW why this is not possible... because the first line of every constructor must be either the call to super() or this(), and here you are trying to put the 'try' ahead of the super(). Not possible.
<side-note>
This is not covered in the current exam, but there are several areas in
Java where this is an issue. Most notably, if you do RMI, where your Remote class extends UnicastRemoteObject, whose constructor does indeed declare a RemoteException. So your Remote class then must explicitly declare a constructor, so that you have a place to declare the exception declared by your superclass constructor.
</side-note>
cheers
Kathy