Do I write javadoc comments for each instance variable?

4186 views java

private String label = "";
private String color = "";
private double edge = 0;

public Dodecahedron(String labelIn, String colorIn, double edgeIn)

I am getting an error message stating missing Javadoc comment. [JavadocVariable] (the instance variable lines and [JavadocMethod]

Is there a specific format or syntax I have to write to get rid of these error?

answered question

That won't be an error, just a warning since docs are never required. Are you running this through a linter?

1 Answer


Javadoc comments start with /** and end with */. It's also customary to start each new line with a *. E.g.:

 * The label to use.
private String label = "";

posted this

Have an answer?


Please login first before posting an answer.