July 2018
Intermediate to advanced
336 pages
9h 23m
English
Kotlin functions can be invoked with the name of the arguments. As an example, consider the following function:
fun withNamedArguments(firstName : String, lastName : String) { println("Hello Mr. $firstName, $lastName");}
This function can be invoked as in the following code:
withNamedArguments(firstName = "Shazin", lastName = "Sadakath");
This is a really nice feature to enable good readability and reduce the number of errors.
Read now
Unlock full access