what is the difference between abstract class and
Interface?where we can use it in realtime projects?
Answer Posted / neha thakur
abstract class contains all abstract method or all concrete
method or combination of both. we can not directly create
object of abstract class.abstract class methods must
implemented in sub class.
interface contains declared method but does not contain body
of method.like abstract class we can not create instance of
interface.methods defined in interface are public &
implicity called as abstract method & interface must be
implemented in the classes with implements keyword which
contains implementation of methods
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are nested classes in java?
Can we store variables in local blocks?
Where are the local variables stored?
How to obtain a performance profile of java program
What is the difference between abstract classes and interfaces?
What languages are pass by reference?
What is the difference between the final method and abstract method?
How do you define a parameter?
What is incompatible types in java?
What are the disadvantages of object oriented programming?
What are the advantages of passing this into a method instead of the current class object itself?
What one should take care of, while serializing the object?
What is entry set in java?
Explain the polymorphism principle?
describe method overloading