| Author |
decimal value for "ffff" is 69904
|
Siva kandasamy
Ranch Hand
Joined: Dec 31, 2002
Posts: 139
|
|
Hi there, Please look at the code. If I uncomment at variable "d", I do get compilation error. Can you tell me why ? My understanding is, decimal value for "ffff" is 69904. Therefor I don't see any difference between variable c and d. Please forgive my ignorance. thanks siva
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24051
|
|
|
0xFFFF is 65535, not 69904. 69904 is thus somewhat larger than the largest possible char value -- hence the compile error.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Ray Stojonic
Ranch Hand
Joined: Aug 08, 2003
Posts: 326
|
|
0xffff == 65535 == Character.MAX_VALUE Decimal value of a hex number can be found by adding the product of each hex digit multiplied by 16^(position), as such: hth
|
 |
 |
|
|
subject: decimal value for "ffff" is 69904
|
|
|