Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What is the difference between abstract class and interface?

Category: Java
  • abstract keyword is used to create abstract class whereas interface is the keyword for interfaces.
  • Abstract classes can have method implementations whereas interfaces can’t.
  • A class can extend only one abstract class but it can implement multiple interfaces.
  • We can run abstract class if it has main() method whereas we can’t run an interface.

Leave a Reply

Your email address will not be published. Required fields are marked *