CS230

Java API

Open a new tab in your browser's window, and load the following page for the java 8 API:

https://docs.oracle.com/javase/8/docs/api/

This is the online java documentation for every class defined in the language. We recommend that you always have this page loaded on a browser window when you set up to do any cs230 work.

Adding documentation to your progrm

There are three kinds of comments in java:

  1. Use the // to indicate one-line comments
  2. Use the /* / to indicate multiple-line comments
  3. Use the /** / to write javadoc

Add some comments to your code.

A first word on javadoc: Javadoc is a documentation tool which defines a standard format for comments, and which can generate HTML files to view the documentation from a web broswer. (As an example, see Oracle's Javadoc documentation for the Java libraries at https://docs.oracle.com/javase/8/docs/api/.) We will talk and start using javadoc soon in this class, but for now, here are a couple of resources on it:

  1. javadoc from Wikipedia
  2. javadoc from Oracle