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...

When should we use abtract class and Interface Class?Give
an Example

Answer Posted / pallavi

Use an abstract class when you want to inherit only from the parent
Use an interface when you want to inherit from multiple sources
If the behaviour of base class is default behaviour of all the sub classes the use abstract. If it is not default behaviour for all the classes use interface.
Interface - CAN-DO relationship
abstract class - IS-A relationship

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

To bind columns manually which tags do you need to add within the asp:datagrid ?

1018


In which event of the page viewstate is available?

927


What is form submit?

1006


Why do you use the app_code folder in asp.net?

1157


How many web config files can be created for an application?

909


Out of ASP or ASP.NET which one is stateless?

1302


What are cookies in asp.net?

1118


Who is using asp.net?

989


Are cookies client side or server side?

952


What is a uri query?

1052


Define managed code and managed data in .net?

1009


How can we access static variable?

1164


What should you do is you want to remove an existing component but would like to make some funtionalities?

1997


Explain the purpose of storyboard.targetproperty.

988


Explain the difference between sql invalidation and sql notification.

1018