Difference among Concrete Class, Abstract class and Interface | Core Java | TechTalk debu

Описание к видео Difference among Concrete Class, Abstract class and Interface | Core Java | TechTalk debu

act method or default/static methods.
Both the interface and abstract In this tutorial shown the difference between concrete class, abstract class, and interface.

Class ( Concrete or Abstract ) :- a subclass can extends only one class at a time because of diamond problem. But it can implements any number of interfaces (to achieve multiple inheritance ).
Interface :- it can extends only interface but it can not has capabilities to provide an implementation of any class.

Concrete class only contain non-abstract ( concrete method ). But abstract class contain both non-abstract and abstract method. if one class contain at least one abstract method, then this class should be abstract class.
abstract class can have constructor and all the data members or variables visibility could be public/private/protected/default. But in interface all the data member by default public static final ( mandatory ). But the interface does not have any constructor. it can contain either abstrclass can't be instantiated.

Follow me on FaceBook:   / techtalkdebu  
Instagram: next_d_paul
and LinkedIn :   / debu-paul-2817a5121  

if you like my video, please subscribe to my channel and share the video

Thanks & Regards,
Debu Paul

Комментарии

Информация по комментариям в разработке