Answer the following questions true (T) or false (F)

1. Mentioning a base class B in an exception specification includes a class D objects, where D is derived from B, in the exception specification.

2. In type matching to select a catch block, only exact matches work.


1. True
Explanation: An object of class D where D is derived from class B is an object of class B. Hence including class B in the exception list allows class D objects to be thrown.
2. True
Explanation: If the catch block specifies double, an int will not be converted to select a double catch block.

Computer Science & Information Technology

You might also like to view...

Which of the following expands on the domain concept by linking domains in logical structures named trees, and multiple trees into forests?

A. WSU B. Active Directory C. NAP D. Enterprise Directory

Computer Science & Information Technology

The name attribute specifies the source of the content for a frame

Indicate whether the statement is true or false

Computer Science & Information Technology

On an RODC, you can use _____________ to encrypt all the data on the server's hard disk

a. Cipher b. BitLocker c. Certificates d. Adhide

Computer Science & Information Technology

A ____ attack automatically directs browsers on many machines to a single web address at roughly the same time, causing so much network traffic to that site that it is effectively shut down to legitimate users.

A. denial-of-use B. trial-of-service C. trial-of-use D. denial-of-service

Computer Science & Information Technology