Please enable JavaScript to use CodeHS

Nevada Computer Science 2

Lesson 5.4 Javadocs and More Methods

Description

Comments are an important part of programming style. Programs are usually written by teams of people and maintained for many years. Others need to be able to read your code and understand what is going on.

This lesson introduces Javadocs, which are a standard, agreed upon way of commenting Java code. There is a tool, also called Javadoc, that is able to read Javadoc comments and create clean, clear documentation for your Java programs. Javadoc refers to both the tool and the style of commenting Java code.

From now on, we will be writing Javadoc comments in our programs.


Objective

Students will be able to…

  • Explain why commenting your code is important
  • Identify Javadoc style comments
  • Analyze a given program for proper documentation
  • Compare and contrast programs with good documentation against programs with poor documentation
  • Create Javadoc comments to document their methods