Multiple Choice Question

Quiz Guidelines

 

QID: 
551
Question: 

Consider that you are writing a set of classes related to a new Data Transmission Protocol and have created your own exception hierarchy derived from java.lang.Exception as follows:

enthu.trans.ChannelException
+-- enthu.trans.DataFloodingException,
enthu.trans.FrameCollisionException

You have a TransSocket class that has the following method:

long connect(String ipAddr) throws ChannelException

Now, you also want to write another "AdvancedTransSocket" class, derived from "TransSocket" which overrides the above mentioned method. Which of the following are valid declaration of the overriding method?

Select 2 options

A. int connect(String ipAddr) throws DataFloodingException
B. int connect(String ipAddr) throws ChannelException
C. long connect(String ipAddr) throws FrameCollisionException
D. long connect(String ipAddr) throws Exception
E. long connect(String str)

Q&A Set: