IF表達式. Java中if else的簡寫如下: String s = "test"; int a = s.length() > 1 ? 0 : -1;. 而在Kotlin中可以寫成. val s = "test" var c = if(s.
確定! 回上一頁