Multiple Choice Question

Quiz Guidelines

 

QID: 
552
Question: 

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.

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!