Kotlin (programming language): Difference between revisions

Content deleted Content added
K0zka (talk | contribs)
K0zka (talk | contribs)
Line 45:
val scope = "world"
println("Hello, ${scope}!")
}
</source>
 
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 peformed before using the value.
 
<source lang=Scala>
 
fun foo(maybeNull : String?, neverNull : Int)
{
}
</source>