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 / sreekanth madamanchi

1. Abstract classes can have implementations for some of
its members (Methods), but the interface can't have
implementation for any of its members.

2. Only an interface can extend another interface, but any
Class can extend an abstract class..
3. Class can inherit only one abstract class, but class can
implement more than one interface
4. An abstract class can contain constructors, but
interface can’t contain any constructors

5. An abstract class can’t support multiple inheritances,
but an interface can support multiple inheritances.
EX:- class A extends AbstractClass
Class A implements interface1, interface2

6. We can use various access modifiers to variables. such
as abstract, protected, internal, public in Abstract Class,
but all of the variables in an interface are implicitly
(Default) static and final.

7. An abstract class can contain abstract and non-abstract
methods, but interface contains only abstract methods. If
we declare the method without having abstract, by default
it takes that method as abstract method

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about .net garbage collector?

995


Explain difference between machine config vs. Web config : Dot net architecture

955


How to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile

995


Do you know textbox and textview controls of .net mobile? : Microsoft dot net mobile

1098


what is the method while we are using adapter and dataset ?

1916


Explain about httpruntime.cach.get(); method?

1070


What is cookie less session?

1061


how to make and display a form without title bar?

1992


What is .net mobile images control. Explain with an example? : Microsoft dot net mobile

994


How to implement the display in the class printdoc (how to resolve the naming conflict) a: no naming conflicts

1110


Define a managed code? : Dot net architecture

1004


What is the difference between machine config vs. Web config : Dot net architecture

999


Explain the purpose of cache? How is it used? : .NET Architecture

1026


What is a service contract, operation contract and data contract?

986


what are constructors and destructors?

2195