image-20221104094507317

案例:

我有一个名字为Main.java的java程序,我想生成一个javadoc

/**
 * @author Meowrain
 * @version 1.0
 */
package com.meowrain;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int[][] a = new int[3][4];
        fill(a,3);
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < a[i].length; j++) {
                System.out.printf("%d",a[i][j]);
            }

        }
    }

    public static void fill(int[][] a, int val) {
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < a[i].length; j++) {
                a[i][j] = val;
            }
        }
    }
}

然后 win + r打开cmd,然后定位到Main.java的路径 执行

生成命令

javadoc -d 输出文件夹路径 -author -version Main.java

image-20221104095016151

image-20221104095036175