Browsing tag:

java interface

OOP: What is an Interface?

An interface is a collection of abstract methods. It is a reference type in Java/Kotlin. It is similar to class. A class implements an interface, thereby inheriting the abstract methods of the interface. [tabs type=”horizontal”] [tabs_head] [tab_title] Java Code [/tab_title] [tab_title] Kotlin Code [/tab_title] [/tabs_head] [tab] public class HelloWorld { class Example implements InterfaceExample{ @Override public […]