A->B->C (EXTENDS)
How the constructors are called when we created an object of C
Answer Posted / ramkishore mateti
When you intantiate Class C then the Class C Constructor
calls its base class(class b) constructor, Class b calls
its baseclass constructor i.e Class a, Class a calls its
base class constructor System.object.System.object
intiallizes class fields, then it comes to Class a it
intializes thier class fields and it comes to Class b after
intilalizion at last the Class C constructor intializes
their class fields.
Hence the Hierarchy of class Constructors are called are
a , b, c
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
What is a di class?
What is view state c#?
What is the difference between array and arraylist c#?
What is default method in c#?
Why are strings immutable c#?
What is singleordefault?
What do you mean by directing?
Can abstract class have constructor?
What is difference between yielding and sleeping?
What is the difference between arraylist and list in c#?
What is anonymous types in c#?
HOW to Develope the CRUD(create,read,update,delete) FORM IN WINDOWS form by using c# only
How does split work in c#?
Explain hash table in c# ?
What is decimal in c#?