React.js
Angular
Ethical Hacking
Agile
AWS
BlockChain
Cassandra
Cloud
Salesforce
Scaled Agile
TOGAF
DevOps
GIT
Jenkins
Jira
Kibana
Linux
NGINX
Ansible
Artificial Intelligence
in JAVA by

Difference between Abstract class and Interface.

Difference between Abstract Class and Interface are as follows:

Abstract Class:

  • Abstract classes have a default constructor and it is called whenever the concrete subclass is instantiated.
  • Contains Abstract methods as well as Non-Abstract methods.
  • The class which extends the Abstract class shouldn’t require implementing all the methods, only Abstract methods need to be implemented in the concrete sub-class.
  • Abstract Class contains instance variables.

Interface:

  • Doesn’t have any constructor and couldn’t be instantiated.
  • Abstract method alone should be declared.
  • Classes which implement the interface should provide the implementation for all the methods.
  • The interface contains only constants.
Click here to read more about DevOps

Related questions

Madanswer
0 votes
asked May 24, 2019 in JAVA by rajeshsharma
0 votes
asked May 24, 2019 in JAVA by rajeshsharma
...