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 java beans?
For class CFoo { }; what default methods will the compiler generate for you>?
What is immutable in java?
Can I learn java in 3 months?
Write a program to solve producer consumer problem in java?
What is an anonymous class in java?
What is arrays aslist in java?
What are format specifiers in java?
What do you know about the garbage collector in java?
How to find the largest value from the given array.
What is fundamental datatype?
explain multi-threading in java?
Is java same as core java?
how to create multithreaded program? : Java thread
What is anagram of a string?