Kotlin 常用语法 冰珊孤雪 2021-03-22 126 阅读1分钟 非空判断 fun test() { if (param == null) { return } } 可以简写成 fun test() { param ?: return }