I have just checked in Java and it can automatical...
# getting-started
w
I have just checked in Java and it can automatically cast
int
to
long
, but not to the
Long
(objects are not subject to cast, only primitives and pointers themselves). I am not sure if this is the reason Kotlin does what it does.