Beyond Knowing
Ed Tools
Play Quiz
Sign in
Join Sookshmas
Beyond Knowing
Jobs
Ed-Tools
Play Quiz
Bhanu. P. K
Wall
Questions
e-Notes
Calculations
MCQs
News/Article
Differentiate between an abstract class and an interface
Abstract
Class
:
A class can extend only one abstract class
The members of abstract class can be private as well as protected.
Abstract classes should have subclasses
Any class can extend an abstract class.
Methods in abstract class can be abstract as well as concrete.
There can be a constructor for abstract class.
The class extending the abstract class may or may not implement any of its method.
An abstract class can implement methods.
Interface
A class can implement several interfaces
An interface can only have public members.
Interfaces must have implementations by classes
Only an interface can extend another interface.
All methods in an interface should be abstract
Interface does not have constructor.
All methods of interface need to be implemented by a class implementing that interface.
Interfaces cannot contain body of any of its method.
GMIT Mandya
Engineering-CS
Engineering-IS
mca
SEM-IV
OOPS
Posted on
by
Score
Share
Views
Comment(s)
Please
Login
to post your answer or reply to answer
Recent e-Note Comments
Recent e-Notes
Top Scored e-Notes
Scroll
×
Login to India's fastest growing social media for Self-Learners!
Sign in with Google
OR
Not registered?
Create an account
Forgot Password?
×
Join India's fastest growing social media network for learning and education!
Sign in with Google
OR
Already a registered user?
Login