Kotlin
https://blog.csdn.net/lckj686/article/details/80448471 https://blog.csdn.net/xiaoluoli88/article/details/78082311fun doubleValue(x: Int): Int = x * 2fun doubleValue(x: Int) = x * 2fun main(args: Array<String>) { // 执行test闭包的内容 test } // 定义一个比较测试闭包 val test = if (5 > 3) { println("yes") } else { println("no") }
Last updated