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 初體驗 入門篇

文章標籤
Kotlin
全站熱搜
創作者介紹
創作者 me1237guy 的頭像
me1237guy

天天向上

me1237guy 發表在 痞客邦 留言(0) 人氣()