views:

122

answers:

2

how to add java docs to my java program using netbeans ?

regards Santhosh S

A: 

On the line above any method or class, type /** and hit enter.
Enter your comments in between.

Padmarag
A: 

You have a number of options:

  • Right-click on a source package and select Tools > Analyse Javadoc. This will add Javadoc to all methods
  • Type /** on the line before a class, method or field declaration, and then press Enter. Default Javadoc will be created for that method
  • Place the cursor within a class or method declaration. Press Alt + Enter, and then select "Create Javadoc"
Daniel
This applies to NetBeans 6.8, right? Does it apply to earlier versions?
vkraemer
I've tried the first and third options on earlier versions of Netbeans than 6.8. I'm fairly sure they work on 6.5. Not so sure about the second one: I've only tried that on 6.8.
Daniel
The first form has been there for quite a while (3 or 4 I think). However in pre-6 release it's available by right-clicking on the class in the projects window and was called something like "Autocorrect Javadoc".The second form has been there since 4 or 5.The third form was introduced in NB6.
Devon_C_Miller