Can anyone explain why I get a compiler error from the byte values but not from the int values:
Thanks- Zac
Zac Roberts<br />SCJP2
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
posted
0
because in the statement byte b2 = -b; the b is promoted to an int because of the unary - sign, thus -b will be of type int which is not assignment compatible with a byte... See 15.15.4 Unary Minus Operator - [ February 18, 2002: Message edited by: Valentin Crettaz ]
You are correct sir... and by the way... are you going to have some sort of celebration when you hit 2000 posts, kindof like the millenium... maybe you could have some tequila to go along with the JavaRanch cowboy thing... Zac
Valentin Crettaz
Gold Digger
Sheriff
Joined: Aug 26, 2001
Posts: 7610
posted
0
I'll get myself some tequilaSSSS, don't worry [ February 18, 2002: Message edited by: Valentin Crettaz ]