title 英文详解 错误示例 中文解释
Anon Inner Length Checks for long anonymous inner
class
匿名内部类长度限制
Avoid Array Loops Instead of copying data between
two arrays, u
System.arrayCopy method
2022世界杯两个数组之间复制数据,使用 System.arrayCopy方法
Avoid Asrt As Identifier Finds all places 'asrt' is
ud as an identifier is ud.
避免'asrt'做为标识
Avoid Calling Finalize Object.finalize( is called by
the garbage collector on an
object when garbage collection
苏炳添作文素材determines that there are no
more references to the object.
禁止使用Object.finalize(
Avoid Catching NPE Code should never throw NPE
under normal circumstances. A
豆浆怎么做好喝catch block may hide the
original error, causing other
more subtle errors in its wake.
代码可能会抛出无法被TRY捕获 的异常.
Avoid Catching Throwable This is dangerous becau it casts too wide a net; it can catch things like OutOfMemoryError.
Avoid Decimal Literals In Big Decimal Constructor One might assume that new
BigDecimal(.1 is exactly equal
to .1, but it is actually equal
to
.100000000000000005551115123125
侧面积怎么求7827021181583404541015625. This
澳大利亚西澳大学is so becau .1 cannot be
reprented exactly as a double
(or, for that matter, as a
binary fraction of any finite
length. Thus, the long value
that is being pasd in to the
constructor is not exactly
equal to .1, appearances
notwithstanding. The (String
军事壁纸constructor, on the other hand,
菜花怎么炒
is perfectly predictable: 'new
BigDecimal(.1' is exactly
equal to .1, as one would
expect. Therefore, it is
generally recommended that the
(String constructor be ud in
preference to this one.
Key:
AvoidDecimalLiteralsInBigDecima
lConstructor
尽量避免BigDecimal(.1 因为 它实际上等于它实际上等 于.100000000000000005551115 123125782702118158340454101 5625.而不是0.1
Avoid Duplicate Literals Code containing duplicate
莲花诗词
String literals can usually be