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 do you mean by streamreader/streamwriter class in c#?
What is sqldatareader c#?
What is double c#?
How do I simulate optional parameters to com calls?
Is null in c#?
How do you access a constant field declared in a class?
what is method overloading in c#?
What is private and shared assembly?
Is datetime a value type in c#?
How do you sort a list in c#?
While debugging a C# application can you change the value of a variable?
Can a method return multiple values in c#?
How to use session under class file of APP_Code folder?
Which attribute is used in order that the method can be used as webservice?
When Should You Call The Garbage Collector In .net?