close
Since Kotlin has been a part of Android Studio, why not start learning it?
Kotlin can let you write lesser code than Java, and support multiple classes in one file.
Everything is an Object, it means they are all reference types.
val cens = orders?.price*100 :? 0
1. If orders are not null, then we get their price multiplied by 100.
2. Otherwise, cents will be default value 0 if orders are null
[線上讀書會] 哲偉 主講 kotlin 初體驗 入門篇
文章標籤
全站熱搜