释义 |
文字的数量 以上为机器翻译结果,快速获取精准的人工翻译结果,建议选择有道人工翻译 1 ?数字字面值 ... 字符串字面值(String literal) 数字字面值(Number literal) 整数范围(IntegerRange):[1….3] , [$foo….$bar] ...
- 1
After the refactoring, all USES of that number or string literal in the class refer to that field, instead of the number or string literal itself. 在重构后,所有对这个类中的数字或字符串文字的使用都将指向该字段,而不是指向数字或字符串文字本身。 - 2
Comparing a variable having an atomic value (number, Boolean, or string) to another such variable or a literal atomic value, and expecting the type of one to be cast automatically to the other type. 把包含原子值(数字、布尔值或字符串)的变量和另一个此类变量或者文字原子值比较,希望一种类型自动转换成另一种类型。 - 3
This way, you can modify the number or string literal in just one place (the value of the field), instead of doing a search and replace throughout your code. 这样,在一个位置(字段的值)就可以实现对所有数字或字符串文字的修改,再也无需在整篇代码中执行查询和替代了。
|