Last active
September 6, 2018 05:00
-
-
Save yimajo/8f5fca4cc16a09e8c807f44aed5a58a8 to your computer and use it in GitHub Desktop.
Kotlin クイズ1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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