Difference between interface and abstract class
213 views · Published 6 February 2014 · 2:18 · Indexed 6 November 2026
Channel: Interview DOT · 2014 · Science & Technology
Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. Difference between interface and abstract class
What is the difference between interface and abstract class ? Java Interview Question And Answer ?
What is the difference between interface and abstract class ?
Interface contains methods that must be abstract; abstract class may contain concrete methods.
Interface contains variables that must be static and final; abstract class may contain non-final and final variables.
Members in an interface are public by default, abstract class may contain non-public members.
Interface is used to "implements"; whereas abstract class is used to "extends".
Interface can be used to achieve multiple inheritance; abstract class can be used as a single inheritance.
Interface can "extends" another interface, abstract class can "extends" another class and "implements" multiple interfaces.
Interface is absolutely abstract; abstract class can be invoked if a main() exists.
Interface is more flexible than abstract class because one class can only "extends" one super class, but "implements" multiple interfaces.
If given a choice, use interface instead of abstract class.
A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm
Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm
Difference between interface and abstract class
More from this channel
-
7:19
java pass by value
-
3:19
java interview best books
-
8:03
Explain java finally block
-
4:29
what are the advantages of OOPL Java Interview
-
2:40
what is java decompiler how to decompile java code
-
5:51
Top 4 Job Interview Tips How to prepare for Job interview
-
5:29
Top Job Interview TIPS What are your strengths How to answer
-
3:49
Top 16 Job Interview Questions Best Job Interview Questions