Skip to content

Instantly share code, notes, and snippets.

@yimajo
Last active September 6, 2018 05:00
Show Gist options
  • Save yimajo/8f5fca4cc16a09e8c807f44aed5a58a8 to your computer and use it in GitHub Desktop.
Save yimajo/8f5fca4cc16a09e8c807f44aed5a58a8 to your computer and use it in GitHub Desktop.
Kotlin クイズ1
fun main(args: Array<String>) {
var value: Int? = null
println(value ?: 0 < 1) // この出力はtrueです
value = 10
println(value ?: 0 < 1) // Q. この出力は何でしょう?
}
/*:
回答の選択肢
- 10
- 0
- 1
- true
- false
- コンパイルエラー
- その他
環境: Kotlin v1.2.61
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment