Java code,java,Example,Tutorials,Syntax,Hibernate,Jsp, Servlet, FileHeadling,Java or Core Java Tutorial or Java Programming Tutorial is a widely used robust technology. learning of java from basic questions like what is java tutorial, core java, where it is used, what type of applications are created in java and why use java.

Search This Blog

Tuesday, 23 August 2016

javadoc tools or API Document

Creating API Document | javadoc tool

We can create document api in java by the help of javadoc tool. In the java file, we must use the documentation comment /**... */ to post information for the class, method, constructor, fields etc



                                      package com.agravatvipul;
/** This class is a user-defined class that contains one methods cube.*/ 
 public class vip
 {
  /** The cube method prints cube of the given number */  
                              public static void  cube(int n)
                                {System.out.println(n*n*n);
             }
  }  



To create the document API, you need to use the javadoc tool followed by java file name. There is no need to compile the javafile.
On the command prompt, you need to write:
javadoc vip.java
to generate the document api. Now, there will be created a lot of html files. Open the index.html file to get the information about the classes.
Share:

Agravat &Google

Total Pageviews

Blog Archive

vipul c.Agravat . Powered by Blogger.

myjava

myjava
java

myimg

myimg
good

Translate

Recent Posts

Unordered List

Definition List

Pages

Theme Support