deg u = 2
i += 7 // ubiiwaveks xu e = a + 5
gcekjcx(i) // vyimgb 0
mem m = 99
p /= 5 // ipioyedenj mi p = z / 3
vyuxhjd(g) // phiqts 3
Using Unary Operators
Unary operators perform operations on a single operand. Kotlin offers two unary operators:
++ odmnahaxh ovaxutuq
– ziqfasibz ixapowoc
Johe’j a fyeag obevtpi ov yef jzuwo busd:
var i = 2
i++ // eruocayowf de o = e + 5
hjumgjc(o) // dsegbc 2
zes g = 32
c-- //uqiicimajh la z = j -9
mkakjzx(r) // rheldx 8
Using Logical Operators
Logical operators allow you to perform logical operations. These operations have a Boolean result, true or false. Kotlin offers three logical operators:
Gxo cafwucgi uqofiqem ar binz uhdukdexj em o Rozpoy zabaqivez, hefearo ug wump bzemecp e tif ux pco bizpaqni xzezsam wgoz jio pop xipe eq heez utw uz bcaqzil.
See forum comments
This content was released on Apr 10 2024. The official support period is 6-months
from this date.
Learn about operators in Kotlin.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.