java中的@符号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19551022/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 18:16:56  来源:igfitidea点击:

The @ symbol in java

java

提问by snocavotia

What exactly does @Object.fielddo? I was reading some code that i fetched from a decompiler. It uses

具体有什么作用@Object.field?我正在阅读一些从反编译器中获取的代码。它用

@Object.name(field = "stuff",field = "stuff")
public static Object fieldName;

采纳答案by Rahul Tripathi

The @ symbol specifies the Annotation types. This represents some metadata associated to your code

@ 符号指定注释类型。这表示与您的代码相关联的一些元数据

The at sign character (@) indicates to the compiler that what follows is an annotation.

at 符号字符 (@) 向编译器指示后面的内容是注释。