标注作为修饰符,可以添加到包、类、接口、方法或字段声明中。
Annotations serve as modifiers that can be added to packages, classes, interfaces, methods, or field declarations.
问题是程序员可能会无意中编写这样的代码(比如,由于“复制和粘贴”操作,错误地在字段声明中包括静态修饰符)。
The problem is that programmers could accidentally write such code (say by mistakenly including a static modifier in a field declaration, due to copy-and-pasting).
注释是可以添加到代码中的修饰符,可以用于包声明、类型声明、构造函数、方法、字段、参数和变量。
Annotations are modifiers you can add to your code and apply to package declarations, type declarations, constructors, methods, fields, parameters, and variables.
类中的常数字段类似于全局或函数常数,不同的只是它的作用范围是该类,而且它可以用多个修饰符来指定其可见性和用法。
A constant field in a class is similar to a global or function constant, except that it is scoped to the class and it can have various modifiers governing its visibility and usage.
类中的常数字段类似于全局或函数常数,不同的只是它的作用范围是该类,而且它可以用多个修饰符来指定其可见性和用法。
A constant field in a class is similar to a global or function constant, except that it is scoped to the class and it can have various modifiers governing its visibility and usage.
应用推荐