Question: Assume class B is inherited from class A . Which of the following statements is correct about construction of an object of class B ?

Options

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.

Click to view Correct Answer

Previous ||

Inheritance - General Questions more questions

Which of the following is correct about the C#.NET snippet....

In an inheritance chain which of the following members of....

Which of the following are reuse mechanisms available in C#.NET?

How can you prevent inheritance from a class in C#.NET....

Which of the following statements are correct about Inheritance in....

Which of the following can be declared in an interface?

A class implements two interfaces each containing three methods. The....

Which of the following statements is correct about an interface....

Which of the following statements is correct about Interfaces used....

Which of the following statements is correct about an interface....

Attributes - General Questions more Online Exam Quiz

.NET Framework - General Questions

Enumerations - General Questions

Exception Handling - General Questions

Functions and Subroutines - General Questions

Interfaces - General Questions

Namespaces - General Questions

Operators - General Questions

Polymorphism - General Questions

Properties - General Questions