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

Difference between abstract class and interface

Answer Posted / ved prakash mishra

ABSTRACT CLASS:-An abstract class declares common attributes and behaviors of the various classes in a class hierarchy. An abstract class typically contains one or more abstract methods that subclasses must override if the subclasses are to be concrete. The instance variables and concrete methods of an abstract class are subject to the normal rules of inheritance.

Attempting to instantiate an object of an abstract class is a compilation error.
Failure to implement a superclass's abstract methods in a subclass is a compilation error unless the subclass is also declared abstract.
we can use abstract superclasses to declare variables that can hold references to objects of any concrete class derived from those abstract classes. Programs typically use such variables to manipulate subclass objects polymorphically. We also can use abstract superclass names to invoke static methods declared in those abstract superclasses.

interface:- A subclass can inherit "interface" or "implementation" from a superclass. Hierarchies designed for implementation inheritance tend to have their functionality high in the hierarchyeach new subclass inherits one or more methods that were implemented in a superclass, and the subclass uses the superclass implementations. Hierarchies designed for interface inheritance tend to have their functionality lower in the hierarchya superclass specifies one or more abstract methods that must be declared for each concrete class in the hierarchy, and the individual subclasses override these methods to provide subclass-specific implementations.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

8. Oop-Why and were we use Interfacse and Abstract class.

2186


how to change the application name?

2007


What is textview control of .net mobile? : Microsoft dot net mobile

1085


What are the new features of .net 2.0?

1016


what is diffrent beatween localprinter and networkprinter

1820


The maximum report processing jobs limit configured by your system administrator has been reached.How I can Solve this problem when i using crystal report to load from my application.

15143


Explain about cookie less session state? : .NET Architecture

1028


What is the purpose of cache? How is it used? : Dot net architecture

937


What is code access security (cas)?

1079


What is cache coherency and how is it eliminated? : .NET Architecture

1053


Explain the types of memory management? : .NET Architecture

990


What is .net mobile input validation. : Microsoft dot net mobile

978


What is the problem with .net generics?

1133


What is parallel computing?

1005


how to delete the record using data reader

2541