close

javadoc is a tool in the jdk folder , it can help us transform the comment which was in program

to a documentation which was html style .

Before starting javadoc , we need to comment our program , 

there is a simple example below:

 

/**

* This is a javadocDemo .

* The comment before the class is used to explain the class javadocDemo.

*/

public class javadocDemo

{

/**

* This is a javadocDemo .

* The comment before the method is used to explain the method javadocMethod.

*/

void javadocMethod()

{

//..do something here


}

 

Then , we can use the command , javadoc , to generate the documentation.

javadoc -d Readme javadocDemo.java

(-d is means the destination directory )

 

ref : http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javadoc.html#examples

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 JerryCheng 的頭像
    JerryCheng

    KwCheng's blog

    JerryCheng 發表在 痞客邦 留言(0) 人氣()