CIS 17: Java Programming
Project A
Following the HelloDate.java example from the text,
import java.util.*;
public class HelloDate {
public static void main(String[] args) {
System.out.println("Hello, it's: ");
System.out.println(new Date());
}
}
create a Hello, World program that simply prints out "Hello, World!".
-
You only need a single method in your class: the main() one that gets executed when the program starts. Remember to make it static and to include the argument list, even though you won't use it.
-
Name the single public class in the file HelloDoc.
-
Add comment documentation to your program. Java in a Nutshell, pp. 312-320 and 342-348, provides more information. Use all of the following tags in their appropriate places:
- @author
- @version
- @param
- @see java.lang.System#out
-
Compile the program with javac and run it using java. If you are using a different development environment than the JDK, learn how to compile and run programs in that environment.
- Extract the comment documentation into an HTML file using javadoc and view it with your Web browser.
Submit your work via the CATE form for Project A.
Legend: method/function keyword literal
2007/02/17