

MCQOPTIONS
Saved Bookmarks
1. |
Given class sample is inherited by class sample 1. Which are the correct statements about construction of object of class sample? |
A. | While creating the object firstly the constructor of class sample will be called followed by constructor of class sample 1 |
B. | The constructor of only sample class will be called |
C. | While creating the object firstly constructor of class sample 1 will be called followed by constructor of class sample |
D. | The order of calling constructors depend on whether constructors in class sample and sample 1 are private or public |
Answer» B. The constructor of only sample class will be called | |