What is the difference between an interface and an abstract class?


An interface is not a class, it contains member declarations only. An abstract class can have declarations and implementations.

What is the difference between an interface and an abstract class?

Written by: Dominic Wegrzynowski Oct 04, 2023

´╗┐An interface is not a class. It contains member declarations only. An abstract class can have declarations and implementations. Members of an interface must be public, abstract classes may contain private members. Multiple interfaces can be implemented by a class, a single abstract class can be inherited by a non-abstract class.


Tags

Login to add a comment
0 COMMENT(S)