/**
* Computes the max of two integers
*
* @param x an integer
* @param y another integer
* @return the larger of the two integers
*/
public static int max(int x, int y){
if (x > y) return x;
else return y;
}
Several important facts:
% javadoc MyProg.javaThis will produce a file called MyProg.html, which can be viewed by a browser. Indeed, if you know HTML, you can embed HTML tags directly into the comments (to specify fonts or include images, for instance). Other html files will also produced.