2 Replies Latest reply: May 18, 2009 7:02 AM by thomas.behr RSS

    [newbie]

    843810
      Some of my comments are not showing up within the javadoc generated. Is there a specific command for having them generated?

      public Manager (double bonus)
           {
                super (null,0,0,0,0);
                this._bonus = bonus;
           }
           
           /*
           * @param     name - Manager's name and surname
           * @param salary - Annual salary (€)
           * @param bonus - Annual performance bonus (€)
           * @param year - year of hire date
           * @param     month - month of hire date
           * @param     day - day of hire date
           */

      Related links:
      http://www.java-forums.org/new-java/19005-javadoc-cannot-compile-param-tags.html
        • 1. Re: [newbie]
          EJP
          In the code you posted you have several @param tags for things that aren't parameters. That's an error on your part, not Javadoc's.
          • 2. Re: [newbie]
            thomas.behr
            You really should heed the advice given to you. JavaDoc documentation comments have to start with
            /**
            (note the double asteriks).
            Moreover, @param will only work if the first word of the tag text matches the name of one of the method parameters. E.g.
            /**
             * @param foo a parameter
             */
            public void f( int foo ) {
            }
            will work whereas
            /**
             * @param bar a parameter
             */
            public void f( int foo ) {
            }
            will not.

            BTW - please use [code]...[[i]code]-tags when posting source code.