Java - Interface

Veröffentlicht am: 05 August 2024
auf dem Kanal: SmartCode Studio
14
1

Covers topics
1. Interface default :
variables : public static final (i.e constants )
methods : public abstract

2. Interface methods :
1. defaults modifiers are public abstract.
2. deafault methods are allowed from java 8
3. private methods allowed
4. static methods are allowed, as they are associated of class and not object and cannot be overridden

3. Interface Inheritance :
1. Multiple inheritance are allowed i.e public interfaceIC extends IA, IB
2. In case of collision i.e both parents have default concrete methods then child class needs to override it.

4. Inheritance :
1. same datatype : extends
2. different datatype : implements


NOTE:
1. public, protected concrete instance methods not allowed
2. instance variables not allowed
3. Constructors, instance-block, static-block block not allowed


Auf dieser Seite können Sie das Online-Video Java - Interface mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer SmartCode Studio 05 August 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 14 Mal angesehen und es wurde von 1 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!