Home / Tag Archives: interface

Tag Archives: interface

Kotlin Interface Examples

Kotlin Interface Examples

An interface defines a contract for classes. An interface is similar to an Abstract class just that, an Abstract class is a collection of abstract methods and variables. Let’s say we have an interface called Driveable. interface Driveable { fun drive() // declaring 'abstract' is implicit and unnecessary } we can …

Read More »

OOP: What is an Interface?

Object Oriented Programming- What is an Interface

An interface is a collection of abstract methods. An abstract method is a method that is declared but contains no implementation. With or without the keyword “abstract” on every function in an interface, as long as it does not have an implementation it is still an abstract Method. When a class implements an interface, it …

Read More »