what is difference between abstract and interface?
can i give real time example for the two topics?
Answer Posted / tharun raj s
an abstract class contains 1)instance variables 2)concrete
methods(implemented methods). 3)abstract
methods(unimplemented methods)
An interface contains 1)abstract methods and variables which
are public static and final by default
Abstract class is written when there are certain common
features shared by all the objects
Interface is written when all the features are implemented
differently in different objects
when an abstract class is written it is the duty of the
programmer to provide subclasses to it.
An interface is written when the programmer wants to leave
the implementation to the third party vendors
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
Can list contain null in java?
What about interrupt() method of thread class ?
Print Vertical traversal of a Binary Tree.
Why is stringbuffer thread safe?
What is a list in java?
Explain about features of local inner class?
What is meant by object oriented programming – oop?
What is a two-pass assembler?
How do you do exponents in java?
what is the difference between a threads start() and run() methods? : Java thread
Can we assign the reference to this variable?
What is the covariant return type?
What is an example of character?
explain the concept of virtual method invocation in polymorphism in detail?
Explain inheritance in java?