Methods
When we refer to methods in OOP, what we mean is that they are the actions that an object can do. Just like properties, methods are defined within a class. By convention, properties are placed first and then the methods. Normally, actions are methods that are defined by name (such as run, jump, and read). These verbs help us get an idea of the action that is expected when the method is executed, such as read data or select database. You can provide parameters to methods if they require additional information in order to execute. On other occasions, those actions will return a value, so we will have to be prepared to use that data. For now, we will define a method that simply prints the title of the book:
class Book {
    var title:String = "Everything about Kotlin"
    var author:String = "Jose Lujan"
    var isbn = "192838493"
    var pages = 250
    fun printTitle(){
    println("Book title: $title")
    }
}
    Methods and functions...