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
what is the difference between a threads start() and run() methods? : Java thread
Is null a string in java?
What is application tier?
What is arrays sort in java?
What is data type in java?
What is json parser in java?
Why put method is idempotent?
What is the use of callablestatement?
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
Why java is object oriented?
Can you extend singleton class?
What is the function of log?
What is abstract class? Explain
What is difference between adapter class and listener?
What is getkey () in java?