In Kotlin, there are classes and functions. However, there is no method anymore. The fun keyword should be used to declare a function.
Kotlin gets some concepts of the Scala language and brings some special classes such as Data classes and Object classes (which we will learn soon). Before that, we will understand how to declare a function in Kotlin. Let's do that!