kotlinc code example
Example 1: kotlin also
| Function | Object reference | Return value | Is extension function |
|----------|------------------|----------------|----------------------------------------------|
| let | it | Lambda result | Yes |
| run | this | Lambda result | Yes |
| run | - | Lambda result | No: called without the context object |
| with | this | Lambda result | No: takes the context object as an argument. |
| apply | this | Context object | Yes |
| also | it | Context object | Yes |
Example 2: kotlin vs java
Kotlin is a language built on and entirely backwards-compatible with Java.
While Java is Object-Oriented first, Kotlin supports a blend
of OO and functional paradigms. For further information, refer to
kotlinlang.org