As usual I won't give the answer right away. Its good to see people
try, I will give hints
See the following code snippets
try{
Base b = new Base();
}
catch(AException ae){
}
catch(BException be){
}
catch(CException ce){
}
So when some one creates Base b catches all the exceptions thrown by
Constructor of Base.
try{
Base b = new Derived();
}
catch(AException ae){
}
catch(BException be){
}
catch(CException ce){
}
Now seeing this code, try and answer, really can we throw more
exceptions in Derived constructor
Now see the following code
public class Derived extends Base{
public void Derived ....................................{
//No code here but then the compiler inserts a super
automatically, which throws 3 exception
}
}
Try to see what I am trying to say.
Regards,
Rohit