Domanda

Prima di metodi Java abbiamo qualcosa di simile:

/**
 * Takes a number and returns its square root.
 * @param x The value to square.
 * @return The square root of the given number.
 */
public float getSqrt(float x) {
...
}

Questo ha un nome (come docstring in Python)?

È stato utile?

Soluzione

In realtà, essi sono chiamati commenti di documenti e javadoc è uno strumento per generare quei commenti in HTML.

È possibile trovare la struttura del commento Javadoc in Wikipedia (per esempio).

Altri suggerimenti

Yup, si chiama javadoc .

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top