| Author |
Interface and Abstract class
|
Abhishek Reddy
Ranch Hand
Joined: Mar 28, 2006
Posts: 259
|
|
|
Can you explain me when to use the interface and when to use the Abstract Class?
|
Abhishek
|
 |
bksella sella
Ranch Hand
Joined: Jul 31, 2003
Posts: 32
|
|
Hi Abhishek, You will use an Interface when you want the developer to implement his own method implementations, but to have the same method signature. You will use an Abstract class when you have some common implementation for certain methods and let the developer implement his own logic for the other methods which are declared abstract. I hope you understood. Let me know if this is clear. - Sella
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
This is a *very* frequently asked question. If you search this and the beginners forum, you should get tons of threads that discuss this topic.
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
 |
|
|
subject: Interface and Abstract class
|
|
|