-
Notifications
You must be signed in to change notification settings - Fork 99
2.) Basic Kotlin Features
Gabor Varadi edited this page Dec 9, 2018
·
19 revisions
-
typed nullability
-
smart casting (and mutable vars gotcha)
-
lateinit vars
-
properties, backing fields (
set(value) { field = value ... }
, difference betweenval x = ""
andval x: String get() = ""
-
string interpolation and """multiline escaped ${strings}"""
-
data classes
-
null safety operators: safe-call (
?.
) and elvis (?:
) -
when
keyword (and complex conditions, such as ranges) -
control statement as expression (assignment of
when
,return
, ...) -
generics (
<T: Blah>
,in/out
, and star projection<*>
)