適用範圍:文件、類、方法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; …… }