About Question enthuware.ocpjp.v7.2.1346 :
Posted: Sun Apr 21, 2013 8:44 am
The answer here is not conclusive.
The question asks:
What methods HAVE TO BE implemented for a class implementing both I1 and I2, not what methods CAN BE implemented.
The correct answer is given to be
public void m1() throws FileNotFoundException
I would argue that this is not necessarily correct however, as this does not actually have to be implemented.
A perfectly valid method implementation would be:
public void m1(){}
An empty subset of the exceptions is a valid subset, so although the one stated certainly CAN be implemented in this case, it does not actually HAVE to be, and that is what the question asks..
The question asks:
What methods HAVE TO BE implemented for a class implementing both I1 and I2, not what methods CAN BE implemented.
The correct answer is given to be
public void m1() throws FileNotFoundException
I would argue that this is not necessarily correct however, as this does not actually have to be implemented.
A perfectly valid method implementation would be:
public void m1(){}
An empty subset of the exceptions is a valid subset, so although the one stated certainly CAN be implemented in this case, it does not actually HAVE to be, and that is what the question asks..