Java primitive types

| 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?

| 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

| Thank you

Total number of posts: 3, last modified on: Wed Jan 1 00:00:00 1720203642

This thread is closed.