Read the following piece of code carefully:
import java.io.IOException;
public class Number1
{
public Number1() throws IOException
{
throw new IOException();
}
}
Assume that the definition of Number1E begins with the line
public class Number1E extends Number1
It is required that calls to any of the constructors of Number1E will not cause any checked exceptions to be thrown. How can this be achieved?
a>By placing the call to the superclass with a super keyword in a try block, with a catch block to handle the IOException thrown by the super class.
b>It can be achieved by avoiding explicit calls to the base class constructor.
c>It cannot be done in the
Java Language with the above definition of the base class.
Answer to this question is given is c>