| Start |
|---|
| Basic examples 1.The Unit return type declaration is optional for functions. The following codes are equivalent. 2.Single-Expression functions:When a function returns a single expression, the curly braces can be omitted and the body is specified after = symbol Explicitly declaring the return type is optional when this can be inferred by the compiler 3.String interpolation: Using string values is easy. 4.In Kotlin, the type system distinguishes between references that can hold null (nullable references) and those that can not (non-null references). For example, a regular variable of type String can not hold null: To allow nulls, we can declare a variable as nullable string, written String?: 5.In Kotlin,== actually checks for equality of values.By convention, an expression like a == b is translated to Remarks
|
Read Article
https://develop.horje.com/learn/1434/reference