TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Difference between Abstract Class and Interface
Lokesh Kumar
Jul 14, 2016
8.9
k
0
3
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
In this blog I mention the difference between Abstract Class and Interface.
Abstract Class
Abstract class provides a set of rules to implement next class
Rules will be provided through abstract methods
Abstract method does not contain any definition
While inheriting abstract class all abstract methods must be override
If a class contains at least one abstract method then it must be declared as an “Abstract Class”
Abstract classes can be instantiated, but a reference cannot be created
Reference depends on child class object’s memory
Abstract classes are also called as “Partial abstract classes”
Partial abstract class may contain functions with body and functions without body
If a class contains all functions without body then it is called as “Fully Abstract Class” (Interface)
Interface
If a class contains all abstract methods then that class is known as “Interface”
Interfaces support like multiple inheritance
In interface all methods r public abstract by default
Interfaces r implementable
Interfaces cannot be instantiated, but a reference can be created
Abstract Vs Interface
Abstract class
Interface
Next Recommended Reading
Difference Between Abstract Class and Interface Class