Разница между абстрактными классами и среди

Abstract
classes

Interfaces

Abstract classes are used only
when there is a “is-a” type of relationship between
the classes.

Interfaces can be implemented by
classes that are not related to one another.

You cannot extend more than one
abstract class.

You can implement more than one
interface.

Abstract class can implemented
some methods also.

Interfaces can not implement
methods.

With abstract classes, you are
grabbing away each class’s individuality.

With Interfaces, you are merely
extending each class’s functionality.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Можно использовать следующие HTML-теги и атрибуты: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>