Java - Interface

Publié le: 05 août 2024
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne Java - Interface durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur SmartCode Studio 05 août 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 14 fois et il a aimé 1 téléspectateurs. Bon visionnage!