Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Use Javadoc tool to create documentation API

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 4.65k
    Comment on it

    Creating a documentation of a Java source file is not a big task, it can be done in just 3 steps which are explained below.

    We use Javadoc tool to create documentation API for a java source file. Let's create a file with class name Documenttool and save this file with name Documenttool.java

     

    Sample code:

    Step 1: write a class and save it with .java as file extension (say Documenttool.java)

    public class Documenttool {
    	
    public static int sum(int a , int b){
    	return (a + b);
    }
    
    public static int minus(int a , int b){
    		return (a - b);
    }
    
    }

     

    Step 2: compile the file using the below command

    javac Documenttool.java

     

    Step 3: Now use the javadoc tool as below

    javadoc Documenttool.java

    Now, we can see in the current directory that a file is created with name Documenttool.html. On opening the Documenttool.html file in a text editor we will see that the Documenttool class is explained through documentation comment. Also, we can see the Documenttool.html in a browser.

    How to Use Javadoc tool to create documentation API

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: