There are a class A. Another class B derived from it.
Now if I do A a = new B(); and B b = new B(); What will
happen in both the statements. And what is the difference
between these two statements.
Answer Posted / srushtitha.
here,A is Base class, B is Derived class.
in the first statement "the object of B is stored in parent
clss reference"(Runtime Polymorphism).
-->In the secend statement "the object is creacted for the
child class.
Is This Answer Correct ? | 23 Yes | 3 No |
Post New Answer View All Answers
What is the difference between yield and return?
What is window application in c#?
What is marshalling in c#?
How do you concatenate in c#?
how to prevent a class from being inherited in c#.net?
What are reflections in c#?
Is overriding of a function possible in the same class?
What is Wrapper class in dot net?
What is string programming language?
What do you mean by string objects are immutable?
Should I make my destructor virtual?
How do I download a program to my desktop?
What is disconnected data architecture in c#?
What is the purpose of a console table?
Does c# support multilevel inheritance?