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

hi all.... i need code snippets for store and retrive tiff fromat images in sqlserver....... kindy provide it.......

1844


What is a method c#?

998


Why do we need structs in c#?

873


What are custom exceptions?

933


Which types of inheritances does c# support?

908


What problem does Delegate Solve?

998


Is c# code is managed or unmanaged code?

1047


What is type keyword in c#?

920


How do you create dlls in .NET

1061


What is c# in asp net?

934


What is the difference between firstordefault and singleordefault?

904


What is uint64?

953


What the different phase/steps of acquiring a proxy object in webservice?

1024


Is datetime value type c#?

884


Is c# strongly typed?

855