Post number #1018882, ID: e8eab9
|
I've just started to study Java and I can't understand why I should use loosers byte or short if I can use long-shlonged long everywear? Or isn't it possible? Where is the difference?
Post number #1018886, ID: e87e1e
|
so all java primitives are signed. which makes java bytes especially sucky. they are also more computationaly demanding. doing math on ints without the extra checks is just faster
they will only take up less memory when in an array
which is the only time you should see them, that being in networking/filesystems where you are forced to deal with them. even then you should probably just use a buffered input stream or some shit
in general stick to ints, maybe longs, rarely BigInts
Post number #1018887, ID: e8eab9
|
Thank you
Total number of posts: 3,
last modified on:
Wed Jan 1 00:00:00 1720203642
| I've just started to study Java and I can't understand why I should use loosers byte or short if I can use long-shlonged long everywear? Or isn't it possible? Where is the difference?