From the course: Java 8+ Essential Training: Objects and APIs

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Document code with Javadoc

Document code with Javadoc - Java Tutorial

From the course: Java 8+ Essential Training: Objects and APIs

Start my 1-month free trial

Document code with Javadoc

- The Java development kit includes a tool named JavaDoc. Its job is to extract information from the code such as names of classes, methods, fields and so on. But it can also include specially formatted comments that you can put into your code. To generate simple Java documentation all you need to do in any project in IntelliJ IDEA, is to go to the menu and select tools, generate JavaDoc. You can either generate the documentation for your entire project, for a single file, or for a custom scope. I'll generate it for a whole project. Down here, set your output directory and make sure that you create a brand new directory for the documentation. If I were to leave this as it's displayed now, placing the documentation in the desktop directory, I'd get a whole bunch of subdirectories and files that are placed directly in that place and that's not what you want. So, I'm going to add a subdirectory of the desktop called docs. And then I'll click okay. And it takes just a moment to generate…

Contents