Niche Numerics

For a surprisingly wide range of programs int
and double
(along with their boxed counterparts Integer
and Double
)
are the only numeric types you will need.
Every now and then, however, you will want something more exotic1.
void main() {
byte b = 123;
IO.println(b);
}
-
The reason I am calling these "exotic" and "niche" has nothing to do with how useful they are. If you want a
byte
then abyte
is what you want. Its just that most of the time (in my experience) you can get by with a little help from yourint
s. ↩