mercredi 24 décembre 2014

Java Doc - Do fields also get documented?


This is a really simple question but oddly, I'm finding it difficult to get a definite answer....


What do you do with fields? Is this valid?



/**
* Keeps track of all usernames in the system.
*/
private List<String> usernames = new ArrayList<>();


Or is above ingnored by documentation tools, so would it be best to do something like:



//Keeps track of all usernames in the system.
private List<String> usernames = new ArrayList<>();


Since (from what I see), documentation only shows methods, constructors and classes, what do programmers usually do with fields?





Aucun commentaire:

Enregistrer un commentaire