Search code examples
javaeclipsejavadoc

Javadoc stopped updating after massive changes


For some reason, my Javadoc has stopped detecting changes to class descriptions. For example, I have a class that has the description A sample of Swing and reference types. which I changed to A sample of Swing and reference types. (Page 78), but even when I delete all the Javadoc folders and regenerate it, it still says A sample of Swing and reference types.. I'm using Javadoc within Eclipse, and I do have the correct Javadoc program selected. Here's another program which won't generate the javadoc description at all:

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");


    }

}

Solution

  • This is the problem:

    /**
     * This program calculates 228 cents of change out.
     * @author Nathan2055
     */
    
    import static java.lang.System.out;
    
    public class CalculatingChange {
    

    The javadoc has to be directly before the class declaration. You've got it before the import statement. So while the above doesn't work, this does:

    import static java.lang.System.out;
    
    /**
     * This program calculates 228 cents of change out.
     * @author Nathan2055
     */    
    public class CalculatingChange {