Answer Posted / sumit sharma
Interface:-> JDK1.5 and above version provide a superb
functionality through interface. That is the main reason
behind using the interface is basically "Interface provide
the loose coupling and also support multiple inheritance".
This is a 100% abstract class. This is also support and
flexible with Polymorphism.
For Example:-
List<String> list = new ArrayList<String>();
Where as List is an interface while ArrayList is an class.
Abstract:-> Abstract class doesn't support multiple
inheritance and if you are creating an any abstract in any
ordinary classes then you must declare abstract. this is
also a major disadvantage of abstract class is that if you
are extend and class or abstract class then you can't extend
any one. Abstract class can't initialize only extended it.
Abstract class may have at least one or more abstract method.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What function extracts specified characters from a string?
What are the Static and Dynamic Variables? Differentiate them.
What is the null?
Is vector ordered in java?
Difference between string, stringbuffer and stringbuilder?
How many functional interfaces does java 8 have?
What is class forname?
Which class is the superclass for every class in java programming?
Why map is used in java?
When the constructor of a class is invoked?
What is a method vs function?
What is the use of a conditional inclusion statement in Java ?
How do you check if a string contains only numeric digits?
Can you declare an interface method static?
What is the use of parseint in java?