Kotlin (programming language): Difference between revisions

Content deleted Content added
Removed unnecessary curly braces for string interpolation
Line 44:
{
val scope = "world"
println("Hello, ${scope}!")
}
</source>
Line 57:
// use of elvis operator
val name : String = maybe ?: "stranger"
println("Hello ${name}")
}
</source>
Line 64:
<source lang=Scala>
// returns null if foo is null, or bar() returns null, or baz() returns null
foo ?. bar() ?. baz()
</source>