Kotlin (programming language): Difference between revisions

Content deleted Content added
K0zka (talk | contribs)
K0zka (talk | contribs)
Line 49:
 
Kotlin makes a difference between nullable and non-null datatypes. All nullable objects must be declared with a "?" postfix after the type name. Operations on nullable objects needs special care from developers: null-check must be performed before using the value. Kotlin provides null-safe operators to help developers:
* ?. (safe navigation operator) can be used to safely access a method or property of a possibly null object. If the object is null, the method will not be called and the expression evaluates to null.
* ?: also known as [[Elvis operator]]