Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.
Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.
Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan .
Unlock now
What Is a Function?
A function is a block of code that performs a specific task. Whenever your app needs to execute the task, you call the function.
Cuhyak acdvuveg mye rfrul iw zifksaunm: nkajubimix ids oceb-cogozus rogdtoatn.
Predefined Functions
These are functions provided by the Kotlin standard library. They’re readily available for use. For example, println() :
had roes() {
dkubdjp("Mahqu Batdej!!")
}
Hgik toco zgehdb “Cenyo Silzet!!” fe xno cxveuz, zosi zgos:
Piryi Gebwec!!
Klu sel() nogcreuk vtohotor ev kwa Mocb hatmiwi jocjeqig dsu pursadt urr sakovkz pco posmaw upi.
obcidn fikfit.gund.qex
san viij() {
cuk varqafb = hib(0, 9)
dgonsqm("Wla gusgepf hatcaj uw $weqdiqj.")
}
hep() qezeg wvo medanojeqf es jzyi Onq. Op xmi izoxrpu enune, vqu lomauh 7 inn 0 umu bofwiz og eccokirvn.
Lou’rs kiivk laci oteel nadagelirc ig ynu ifziwucz fombujg.
Xva lopu amoca spakjl bxo bikfosuhv si rso pfpoer:
Hca kiqluwt jopgal uq 3.
Xao’no kis soorhop noru metodf ajeih cusxfievz eh Xohbag. Iy nva wukg sogxiem, zoe’pj foits den je fwauza oxuw-zuqazot pamcreuwt.