"On the Java platform, numbers are physically stor...
# announcements
p
"On the Java platform, numbers are physically stored as JVM primitive types, unless we need a nullable number reference (e.g.
Int?
) or generics are involved. In the latter cases numbers are boxed." What does it mean by boxed?
m
wrapped in Java instance of Integer class (for example)
m
What Marcin said A java int is a JVM primitive and always needs to have a value. In order to make that int nullable; e.g. have no value. You can put that int into a class holding only that value: class Integer( val value: int ) since Integer can be nullable, the whole int can be nullable.
p
oh ok, thanks!