Programming Languages C# Objective
Mar 06, 2013

Assume class B is inherited from class A. Whichstatements is correct about construction of an object of class B?

Choose the correct answer:
A) While creating the object firstly the constructor of class B will be called followed by constructor of class A.
B) While creating the object firstly the constructor of class A will be called followed by constructor of class B.
C) The constructor of only class B will be called.
D) The constructor of only class A will be called.
Detailed Explanation

Option B is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback