jo
12/19/2016, 8:48 PMkennycason
12/19/2016, 8:48 PMjo
12/19/2016, 8:50 PMjo
12/19/2016, 8:50 PMjo
12/19/2016, 8:51 PMjo
12/19/2016, 8:52 PMkennycason
12/19/2016, 8:55 PMjo
12/19/2016, 8:56 PMjo
12/19/2016, 8:56 PMandreworobator
12/19/2016, 9:15 PMelizarov
12/19/2016, 9:17 PMandreworobator
12/19/2016, 9:19 PMponzii
12/19/2016, 10:07 PMponzii
12/19/2016, 10:07 PMponzii
12/19/2016, 10:07 PMnatpryce
12/19/2016, 10:08 PMages[”Dave”]
can return null
. The type is Int?
not Int.ponzii
12/19/2016, 10:08 PMnatpryce
12/19/2016, 10:09 PMnatpryce
12/19/2016, 10:09 PMages
map, the Kotlin type checker cannot track thatponzii
12/19/2016, 10:09 PMnatpryce
12/19/2016, 10:09 PMages[”Bob”]
would return null
natpryce
12/19/2016, 10:10 PMages[”Dave”]
returns 26
(an Int)ponzii
12/19/2016, 10:10 PMroberto.guerra
12/19/2016, 10:10 PMnatpryce
12/19/2016, 10:10 PMnatpryce
12/19/2016, 10:10 PMfun get(key: String): Int?
to reflect that some Strings do not map to a value in the mapponzii
12/19/2016, 10:10 PMdpk
12/19/2016, 10:11 PMroberto.guerra
12/19/2016, 10:11 PMnatpryce
12/19/2016, 10:12 PM!!
operator, which will throw a NullPointerException if it is actually null