适用范围:文件、类、方法java
(多个做者使用多个@author标签标识,java doc中显示按输入时间顺序罗列。)
例:* @author Leo. Yaoui
适用范围:方法code
例:* @param str the String用来存放输出信息。对象
适用范围:方法接口
例: * @return true
执行成功;文档
false
执行失败.input
用于标识编译该文件所须要的JDK环境。it
适用范围:文件、类io
例: * @since JDK1.6编译
用于标识注释对象的版本号
适用范围:文件、类、方法
例: * @version 1.0
表示参考。会在java 文档中生成一个超连接,连接到参考的类容。
用法
@see #field
@see #Constructor(Type, Type...)
@see #Constructor(Type id, Type id...)
@see #method(Type, Type,...)
@see #method(Type id, Type, id...)
@see Class
@see Class#field
@see Class#Constructor(Type, Type...)
@see Class#Constructor(Type id, Type id)
@see Class#method(Type, Type,...)
@see Class#method(Type id, Type id,...)
@see package.Class
@see package.Class#field
@see package.Class#Constructor(Type, Type...)
@see package.Class#Constructor(Type id, Type id)
@see package.Class#method(Type, Type,...)
@see package.Class#method(Type id, Type, id)
@see package
标识出方法可能抛出的异常
适用范围:方法
例: * @throws IOException If an input or output exception occurred
标注此类/接口、方法、字段已经被废止
适用范围:文件、类、方法
连接到一个目标,用法相似@see。但常放在注释的解释中形如{@link …}
/** - @deprecated As of JDK 1.1, replaced by - {@link #setBounds(int,int,int,int)} */
```java
/**
```
public class Test extends Button { /** - 为按钮添加颜色 - @author Administrator - @param color - @return - @exception (方法有异常的话加) - @Time2012-11-20 15:02:29 */ public voidaddColor(String color){ …… } }
public final class String implements Java.io.Serializable, Comparable<String>,CharSequence { /** The value is used for characterstorage. */ private final char value[]; /** The offset is the first index of thestorage that is used. */ private final int offset; …… }
public class EmailBody implements Serializable{ private String id; private String senderName;//发送人姓名 private String title;//不能超过120个中文字符 private String content;//邮件正文 private String attach;//附件,若是有的话 privateSet<EmailList> EmailList; …… }