| Author |
What's the differnce betwwen abstract class and interface
|
Tan Richards
Greenhorn
Joined: Sep 29, 2005
Posts: 18
|
|
Hi, actually I would like to know under what circumstances one should go for abstract class and interface? It's understood when multiple inheritence is required interface must be used. But are ther any other factors that will decide that whether one should make a particular class abstract or use interface. It is being assumed that the class is used for just creating a prototype( I mean the sole purpose of using abstract methods).
|
"Failures are pillars of success" - That doesn't mean you go on building pillars
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
See http://faq.javaranch.com/view?InterfaceVsAbstractClass
|
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
|
 |
Aadi Narayana Reddy
Greenhorn
Joined: Oct 17, 2005
Posts: 13
|
|
When u have some default functionality to be placed some where so that the all the subclasses can use the default functionality from its super classes, and they can provide some more info,, in the subclass. and when u r required to build subclasses which must have their specific behaviour then u can go for interface and implement it with respect to the specific subclass. aadi
|
G.Adi Narayana Reddy,
|
 |
 |
|
|
subject: What's the differnce betwwen abstract class and interface
|
|
|