Re: [GD-General] Java bitching
Brought to you by:
vexxed72
From: Joe <dar...@ya...> - 2002-01-08 02:31:07
|
Try using Integer.byteValue() and see what you get :) Seems like they should have returned a byte[] instead of a single byte... but probably no one actually uses the Integer class other than for converting strings to ints and perhaps as an int object container... Colin Fahey wrote: >>>>The problem here is that a byte in java is signed. >>>> > >D'Oh! > >I guess I've been conditioned to think of "byte"s as >8-bit values, not small signed integers. > >Since "char" in Java is a signed 16-bit integer, I >guess they would have to make "byte" their signed >8-bit integer. > >I'd rather that Java defined "byte" as "UN-signed 8-bit >integer", and "char" as "8-bit signed integer", and >"wchar" as "16-bit signed integer". But everything in >Java is signed, and Java is so wildly popular that >redefining "byte" is impossible without the use of >a time machine and brain-washing equipment...Set the >coordinates to Sun's remote Java think-tank conference >room -- date: the day they decided to call "byte" >a signed 8-bit integer. (Note to self: Bring the attache >case of money, and bet on sporting events. Meet up >with the earlier "me" and tell him that 2001 is gonna >suck. Don't step on the Butterfly in Beijing, or you'll >cause a catastrophic change in the Earth's climate, >disrupt the timeline, and send the planet spiraling >in to the Sun.) > >But, as it is, I'm *glad* the compiler is doing the >"right thing". > >--- Colin > > > >_______________________________________________ >Gamedevlists-general mailing list >Gam...@li... >https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > |