官术网_书友最值得收藏!

Kotlin Playground

The fastest way to try Kotlin code without the need to install any software is Kotlin Playground (https://try.kotlinlang.org). We can run Kotlin code there using JavaScript or JVM Kotlin implementations and easily switch between different Kotlin versions. All the code examples from the book that does not require Android framework dependencies and can be executed using Kotlin Playground.

The main function is the entry point of every Kotlin application. This function is called when any application starts, so we must place code from the book examples in the body of this method. We can place code directly or just place a call to another function containing more Kotlin code:

    fun main(args: Array<String>) { 
        println("Hello, world!") 
    }
Android applications have multiple entry points. The  main function is called implicitly by the Android framework, so we can't use it to run Kotlin code on the Android platform.
主站蜘蛛池模板: 江孜县| 容城县| 临沂市| 信宜市| 米易县| 泽州县| 桃江县| 化州市| 天祝| 宁河县| 苗栗市| 叙永县| 霸州市| 营山县| 鹤山市| 蓝田县| 专栏| 南平市| 昌宁县| 友谊县| 大田县| 沾化县| 商南县| 秭归县| 林甸县| 福泉市| 四川省| 织金县| 巧家县| 莱芜市| 峨山| 晋江市| 灌阳县| 炎陵县| 延寿县| 苗栗市| 湘潭市| 和龙市| 湟源县| 西昌市| 冀州市|