23

I want that when i mouse over a method i would be able to see my documentation of what the method does like when i put the mouse over Java's method I know that /** */ is how its done but:

  1. How do you explain what the Params Stands for?

  2. How do you create a new line, or make a word bold or italic?

1
  • 4
    Please read the docs Commented Aug 1, 2012 at 16:43

2 Answers 2

40

In most major IDEs, such as IntelliJ's IDEA, Apache Netbeans or Eclipse; you can type

/**

and press enter and it will generate the Javadoc for your method, including parameters, return values, etc. You just need to put in the descriptions.

The same applies for class declarations (the Javadoc comment always relates to the following element)

For instance

/**
 * create_instance
 * @param array of attributes for instance containing web, db, arrival_rate, response_time for instance 
 * respectively.
 * @return Instance object
 */
Sign up to request clarification or add additional context in comments.

2 Comments

You can do the same thing for intelliJ
You don't need to specify the method name at the top of the comment. It wiil work with or with out it.
26

How do you explain what the Params Stands for?

Use @param tag:

/**
 * @param paramName Explanation of the param
 */
public void foo(String paramName);

How do you create a new line, or make a word bold or italic?

Use standard HTML, i.e. <p></p>, <br/>, <strong> and <em> (or less semantic <b> and <i>)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.