Question asked by visitor anil
I have a bit confusion with ABSTRACT and INTERFACE.
What does it means ..
Where it is used...
When should used...
How does it work....
Tell me clear in all possible way
Question asked by visitor anil
I have a bit confusion with ABSTRACT and INTERFACE.
What does it means ..
Where it is used...
When should used...
How does it work....
Tell me clear in all possible way
This will be helpful.
http://mindprod.com/jgloss/interfacevsabstract.html
Abstract classes are used if we want to have some method definition to be in subclass.so that the implemented subclass use that definition.
Suppose if we dont know the defintion ,we only know the syntaxwe declare that method as abstract.
Abstract class may have both abstract& concrete methods in it.
so abstract classes are uses if we know definition of some methods & dont know the def of some methods
As the abstact classes are classes we cant implment multiple inheritence.
For this feature interfaces cam ein to existence.
interfaces consists of all abstract methods.
so we can implment more than one interface feature in our class.
Is it ok??????????????