Java 官方笔记 10 注解
本书作者:测试开发刚哥,文章版权归个人所有,未经授权请勿转载。 注解 注解的作用: Information for the compiler — Annotations can be used by the compiler to detect errors or suppress warnings. Compile-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth. Runtime processing — Some annotations are available to be examined at runtime. 注解格式,使用@: @Entity 带 key-value: @Author( name = "Benjamin Franklin", date = "3/27/2003" ) class MyClass { ... } 只有 1 个 key 时可以省略 key: ...