Search code examples
javajavadoccomments

how to explain propose of public class in Javadoc


Hi I was asked to explain the purpose of each public class, public method, and public field in my program, but I do not know what to write it, for example is @param only for methods?

Can you give an example of each class, method and field for javadoc please?


Solution

  • If you use Eclipse then type /** and press enter just before the method or class declaration you want to document.
    For each method/class the corresponding anotations will appear and you can write the details of method/class.
    By pressing ctrl+space inside this area you can see all the available @ options for documentation purposes