Interface | Abstract Class |
---|---|
Multiple Inheritance is possible, a class can implement more than one number of interface. | A class can inherit only one class. |
'Implements' keyword is used. | 'Extends' keyword is used. |
For interface by default methods are public and abstract, no need to specify. | They have to be declare as public or abstract. |
No implementation of methods. | Can have concrete as well as abstract methods. |
All methods have to be overridden. | Only abstract methods have to be overridden. |
All variables are public, static and final. | In abstract, variables have to be declare explicitly. |
Methods can't be static. | Non-abstract methods can be static. |
Difference between Interface vs Abstract Class
About Vipul Singh
Editor-in-Chief and Owner of TechBlogMU. Computer Engineer, Data Science Enthusiast and Tech Blogger. Catch him on Facebook and Twitter
Become a Patron: https://www.patreon.com/techblogmu
Subjects
- Artificial Intelligence (AI)
- ASP.NET with C#
- Big Data Analytics
- Computer Networks
- Cryptography and System Security
- Data Structures
- Data Warehouse and Mining
- Database Management System
- Digital Signal Processing
- Human Machine Interaction
- Machine Learning
- Microprocessor
- Object Oriented Programming Methodolgy (OOPM)
- Operating System
- Parallel and Distributed Database
- Software Architecture (SA)
- Statistics
- Structured and Object Oriented Analysis and Design (SOOAD)
- System Programming and Compiler Construction (SPCC)
- Theory of Computation