July 2018
Intermediate to advanced
336 pages
9h 23m
English
Unlike Java function arguments, Kotlin supports default arguments in functions. This enables flexible function writing, as in the following code:
fun withDefaultValues(name : String = "Shazin", age : Int = 32) { println("Name $name and Age $age");}
The preceding function can be called as follows:
withDefaultValues();withDefaultValues("Shahim", 32);
Read now
Unlock full access