Java - Interface

Published: 05 August 2024
on channel: 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


On this page of the site you can watch the video online Java - Interface with a duration of hours minute second in good quality, which was uploaded by the user SmartCode Studio 05 August 2024, share the link with friends and acquaintances, this video has already been watched 14 times on youtube and it was liked by 1 viewers. Enjoy your viewing!