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

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.
主站蜘蛛池模板: 资溪县| 长乐市| 新龙县| 无锡市| 新营市| 杂多县| 望谟县| 渭南市| 揭西县| 抚州市| 岑巩县| 会同县| 佳木斯市| 台湾省| 上杭县| 万源市| 靖州| 兴隆县| 资阳市| 定安县| 萨迦县| 西安市| 皮山县| 会理县| 安徽省| 苏州市| 壶关县| 廊坊市| 若羌县| 石渠县| 依兰县| 同心县| 房山区| 武穴市| 长岭县| 高雄市| 漳浦县| 米泉市| 宝清县| 上饶市| 巫山县|