出于某种原因,我的 Javadoc 已停止检测对类描述的更改。例如,我有一个类,它的描述已A sample of Swing and reference types.
更改为A sample of Swing and reference types. (Page 78)
,但即使我删除所有 Javadoc 文件夹并重新生成它,它仍然显示为A sample of Swing and reference types.
。我在 Eclipse 中使用 Javadoc,并且选择了正确的 Javadoc 程序。这是另一个根本不会生成 javadoc 描述的程序:
package com.nathan2055.booksamples;
/**
* This program calculates 228 cents of change out.
* @author Nathan2055
*/
import static java.lang.System.out;
public class CalculatingChange {
/**
* @param args
*/
public static void main(String[] args) {
// 248 cents...
int total = 248;
// How many quarters?
int quarters = total / 25;
int whatsLeft = total % 25;
// How many dimes?
int dimes = whatsLeft / 10;
whatsLeft = whatsLeft % 10;
// How many nickels?
int nickels = whatsLeft / 5;
whatsLeft = whatsLeft % 5;
// How many are left?
int cents = whatsLeft;
// And then tell me.
out.println("From " + total + " cents you get:");
out.println(quarters + " quarters");
out.println(dimes + " dimes");
out.println(nickels + " nickels");
out.println(cents + " cents");
}
}