Name: boT120536 Date: 11/09/2000
java version "1.3"
The documentation for the Character.forDigit(int, int) method, located at
http://java.sun.com/j2se/1.3/docs/api/java/lang/Character.html has an error.
The documentation block states:
"The digit argument is valid if 0 <= digit <= radix."
This is incorrect. It should read:
"The digit argument is valid if 0 <= digit < radix."
-----
In any base-n numbering system, the value n is represented
by the two digit
number "10".
Therefore, there is no single digit that could possibly be
returned by
Character.forDigit(n, n), though the docs state that 'a' + n will be
returned.
-----
It is possible that Character.forDigit never gets called
with equivalent
parameters, since the first parameter is probably a result
if some number
MOD the second parameter, which will always yield a number
less than the
second parameter. In that sense, it is likely that no
other code needs to
be changed if the Character.forDigit()'s method code is
incorrect and
changed.
(Review ID: 111359)
======================================================================