Skip to content

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 between val x = "" and val 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 <*>)

Clone this wiki locally