java Interface with example

Published: 15 February 2020
on channel: Java code&Decode
115
7

1) An interface is a specification of method prototype.
2) An interface contains 0 or more abstract methods.
3) All the methods as the interface are public and abstract by default.
4) An interface can also contain variables which are public, static and final by default.
5) We can not create an object to an interface.
6) But we can create a reference variable of interface type.
7) All the methods of the interface should be implemented in its implementation classes.
8) If any method is not implemented, then that class should be declared as ‘abstract’.
9) Interface reference can be used to refer to all the objects of its implementation classes. 10) Once an interface is written, any third party vendor can provide implementation classes. 11) An interface can not implement another implement.
12) An interface can extend another interface.
13) We can create classes in an interface.
14) A class can implement multiple interfaces.


On this page of the site you can watch the video online java Interface with example with a duration of hours minute second in good quality, which was uploaded by the user Java code&Decode 15 February 2020, share the link with friends and acquaintances, this video has already been watched 115 times on youtube and it was liked by 7 viewers. Enjoy your viewing!