Javadoc tool

    Javadoc tool

    Javadoc tool allows you to create the documentation API in java. Java provides you with the documentation comment feature to post information or the code detail for any class, method, constructor, data fields etc.

    Example-

    class Simple{  
    
      int var=50;  
      /** this is the simple print example*/
      public static void main(String args[]){  
       Simple op=new Simple();  
       System.out.println("before change "+op.var); 
     }  
    } 

    Output-

    If you want to create the documentation API, you can directly use the Javadoc tool followed by the java file name. For this, you do not have to compile the java file.

    You can run the below command directly on the command prompt-

    Example-

    public class Simple{  
       int var=50;  
      
       /** this is the simple print example*/
       public static void main(String args[]){  
          Simple op=new Simple();  
          System.out.println("before change "+op.var); 
        }  
    }  

    Output -

    You can see many html files are creating. You can open the index.html file to get the class information. Below is the index.html file for the above class.