r4zzz4k
12/08/2017, 7:30 PMvalue2
has the type Int
, not Int?
, so null
is not a valid value. You should go through the basics of the language, probably Kotlin Koans (https://kotlinlang.org/docs/tutorials/koans.html) are a good place to start. That will help you to proceed to more complex things.