Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What do you mean by streamreader/streamwriter class in c#?

1001


What is sqldatareader c#?

917


What is double c#?

989


How do I simulate optional parameters to com calls?

1002


Is null in c#?

941


How do you access a constant field declared in a class?

956


what is method overloading in c#?

1093


What is private and shared assembly?

1069


Is datetime a value type in c#?

937


How do you sort a list in c#?

918


While debugging a C# application can you change the value of a variable?

1094


Can a method return multiple values in c#?

912


How to use session under class file of APP_Code folder?

1074


Which attribute is used in order that the method can be used as webservice?

984


When Should You Call The Garbage Collector In .net?

1091