Object Oriented Programming - Object Modelling - 2

46:  

A default exception block must be placed

A.

first among the catch blocks

B.

last among the catch blocks

C.

globally at the top of the file 

D.

at the end of all code in program.

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



47:  

A default catch block catch

A.

all thrown objects

B.

no thrown objects

C.
any thrown objects that has not been caught by an earlier catch block
D.
all thrown objects that have been caught by an earlier catch block.
 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



48:  
An exception specification begins with the keyword
A.

exception

B.

try

C.

throw

D.

catch

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



49:  
A program can directly access the .......... members of a class.
A.

hidden

B.

private

C.

public

D.

both (b) and (c)

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



50:  
The program can access the private members of a class
A.

directly

B.
only through other private members of the class
C.

only through other public members of the class

D.

none of these

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here: