Engineering Full Stack Apps with Java and JavaScript
Consider the following class:
public class PortConnector{
public PortConnector(int port) throws IOException{
...lot of valid code.
}
...other valid code.
}
You want to write another class CleanConnector that extends from PortConnector. Which of the following statements should hold true for CleanConnector class?
Select 1 option
A. It is not possible to define CleanConnector that does not throw IOException at instantiation.
B. PortConnector class itself is not valid because you cannot throw any exception from a constructor.
C. CleanConnector's constructor cannot throw any exception other than IOException.
D. CleanConnector's constructor cannot throw any exception other than subclass of IOException.
E. CleanConnector's constructor cannot throw any exception other than superclass of IOException.
F. None of these.