J
John Goche
Hello,
It appears to me that a way of specifying byte literals and short
literals has been left out of the Java language (unlike int literals
which need no special syntax and long literals which can be
specified by appending an L suffix to the number
being represented).
Anyone know how come these have been left out (I guess
it must be because I can always cast an int literal to a
short or byte).
Also, quite a bummer that there are no signed ints and longs.
When reading 16-bit unsigned values and 32-bit values from
the network I am being forced to use ints and longs thus
wasting a few bytes here and there, not that it matters
much I suppose.
Regards,
JG
It appears to me that a way of specifying byte literals and short
literals has been left out of the Java language (unlike int literals
which need no special syntax and long literals which can be
specified by appending an L suffix to the number
being represented).
Anyone know how come these have been left out (I guess
it must be because I can always cast an int literal to a
short or byte).
Also, quite a bummer that there are no signed ints and longs.
When reading 16-bit unsigned values and 32-bit values from
the network I am being forced to use ints and longs thus
wasting a few bytes here and there, not that it matters
much I suppose.
Regards,
JG