In this Kotlin lecture, we’ll break down why numeric type conversions are almost always explicit, how the methods
toInt(),
toDouble(),
toFloat() work, why conversions
Double
→
Int can be dangerous, and also how the
Char type is designed: the
code property, conversion via
toChar(), working with digits
'0'..
'9', and a mini-scenario for generating a coupon.