what is difference between abstraction and interface?
Answers were Sorted based on User's Feedback
Answer / kavitha
Abstract classes define methods and interfaces declare
methods.
Interfaces declare methods without implementation.
Abstract classes are very much useful when there is a same
functionality across various classes.
Interfaces are useful for classes which varies in
functionality and with the same method signature.
| Is This Answer Correct ? | 12 Yes | 0 No |
A class becomes an abstract class when it has atleast one
abstract method(a method with no definition).The major
difference between abstract classes and interfaces is that
an abstract class can contain both methods with zero
definition as well as methods with definition.But an
interface is one in which all the methods are with no
definition.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / muthusenthil
Abstract class contains one or more unimplemented methods
left for future implementation by its derived class.it has
all property of class it cannot be instantiated.it provides
default behaviour.
Interface is mear specification nothing is implemented its
just a declaration.in java using interface we can model
multiple inheritance. it provides design flexibility.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / munna
in abstraction we ca have abstract method and normal method
but in interface we must and should write only abstract methods
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pushpendra mishra
Abstract is used in Frame work but Interface is used in specification
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / hitesh mandhyan
Abstraction is used in framework interface is used in
specification...
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / meena
abstraction is used in framework
interface is used in specification
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / ravikiran
abstraction is used in framework
interface is used in specification
| Is This Answer Correct ? | 1 Yes | 3 No |
What class is used to create Server side object?
Can a class inherit the constructors of its superclass?
Explain about method local inner classes or local inner classes in java?
Explain notifyall() method of object class ?
what is deadlock? : Java thread
What does java se mean?
Is array passed by reference in java?
Is c better than java?
we r taking <load-on-startup>0</load-on-startup> <load-on-startup>1</load-on-startup> in deployment descripter for loading servlets like serv1 N serv2? so 'll it take serv1 or serv2
Explain the importance of finally over return statement?
what is abstract method with example?
What is meant by oops concept in java?