Java Ruels (中文版) 勘误列表

 

ver: 0.1

last modified:2003-10-29

1

出处:1.6.2.3节最后一自然段

原文:The first Unicode escape is not translated because there are an odd number of \ characters at the start of the escape sequence.

译文:第一个Unicode转义序列没有被翻译,因为在转义序列的开始有偶数个的\字符(译者注:原文为“because there are an odd number of \ characters at the start of escape sequence”,但是实际上是偶数个才导致这种情况)。

说明:这儿译者理解偏差了,译注是不必要的。作者的意思是指“转义序列”前的 \ 的字符的个数,这样就不包括转义序列本身的 \ 符号了。比如:\\u2122 中转义序列是 \u2122,该转义序列前的\ 的个数是1(奇数),同样对于 \\\\u2122 中的转义序列前的 \ 符号是3个,而不是4个。这些都不会被翻译。

修正:第一个Unicode转义序列没有被翻译,因为在转义序列的开始有奇数个的\字符。

感谢:burrowu

 

2

出处:1.6.3节倒数第二自然段

原文:The string concatenation operation can be optionally enclosed in parentheses for the sake of clarity.

译文:为了清楚起见,可以将字符串连接操作符放在圆括弧中间。(译者注:原文为The string concatenation operation can be optionally enclosed in parentheses for the sake of clarity,译者在JDK1.3.1上测试String ok="oooo"(+)"iiii";会产生编译错误,但是可以使用String ok=("oooo"+"iiii");这样的形式,不知作者是否指的就是这种形式)

修正:为了清楚起见,可以将字符串连接操作放在圆括弧中间。

感谢:burrowu