Interfaces

Interfaces in Kotlin are very similar to Java 8. They can contain declarations of abstract methods, as well as method implementations. What makes them different from abstract classes is that interfaces cannot store state. They can have properties but these need to be abstract or to provide accessor implementations.

Classes

class Invoice {
}
The class declaration consists of the class name, the class header (specifying its type parameters, the primary constructor etc.) and the class body, surrounded by curly braces. Both the header and the body are optional; if the class has no body, curly braces can be omitted.

How can we Implement Interface and How to Inheriting class in Kotlin
Its just simple we are using : keyword for exteding class and Implementing interface in Kotlin
you can see this YOUTUBE Video
https://youtu.be/2LhXvPqbIdQ

Comments

Popular Posts