This Question Is Answered:
 What Is The Difference Between Interface And Abstract Class And Interface And Multiple Inheritance?
 31 Jan 2007 09:04
 Flag
 An abstract class is a class which you will never instantiate. It is designed as the parent class from which other classes will inherit. It contains a set of common features they will all have. It can contain concrete or abstract methods.

An interface is similar to an abstract class but with one important difference. ALL its methods are abstract. You state the methods that must be used, but do not include the body code for any of them. EG in a geometry program you might have an interface which included an area method, a volume method and a findCentre method. But as the code would be different for every geometrical shape, you leave the body empty. When you use it, you MUST add the code for each empty method.

In some langauges, such as Java, multiple inheritance is not allowed (thankfully, as it is a very complex way to work!). But you can use more than one interface. So it is a sort of way around the lack of multiple inheritance.
Unrated

1 ratings
by   drjohn
  01 Feb 2007 11:52
 Flag

1000 words left

    


Blurtit Tools:  Email to a Friend    Bookmark this page
What Disk Do I Use?
Where Can I Find A Free
DVD Decoder?
Where Can I Find A Wire
Schematics For A Philips
PC Camera Board
SIC4750/27
What Are Memory Sticks?
What Are Input And Output
Devices?
How Do I Use SanDisk
Flashcard? Got To Where
It Shows Up As A New
Device On My Computer.
When would one use a
rapid test script wizard
in winrunner and why?
My Computer Is Not
Showing My Sound Driver.
How Do I Get It Back?
What New Input Devices
Are Available?
I'm Looking For Drivers,
Can You Help?
My Blurtit
My Profile
My Questions
My Answers
Blurtit Features
Ask a Question
Answer a Question
Search an Answer
Categories
Tools
Link to Blurtit
Add Blurtit to Firefox
Search Engine
See Your Site Here
Link to Blurtit
RSS
Blurtit.com
About Us
Terms & Conditions
Privacy Policy
Contact Us
Advertise With Us
Help
International
 Chinese Site
 Japanese Site
To continue you need to be registered with us first.

I am already a Blurter, and need to login
I am not a Blurter yet, but would like to register