|
|
Java Student Project |
||
|
|||
| Hello World | |||
|
|
|
||
| Ability Level: | Beginner | ||
|
|
|
||
| Estimated Time: | 40 minutes | ||
|
|
|
||
| Objectives: |
|
||
|
|
|
||
| Materials & Resources: |
|
||
|
|
|
||
| Overview: | Write a program that prints out "Hello World!" |
||
|
|
|
||
| Instructions: |
2. Read in the hints section why the following code is used. 3. If you are using J++, follow the instructions for the compiler in the extras section below.
|
||
|
|
|
||
| Hints: | Some
important points to keep in mind in doing this project:
The file name and the project name need to be the same. Writing a Java program A. All Java statements must end with a semi-colon (;) B. Programs may contain literal strings (a series of characters in double quotes) C. Programs contain user-defined variables and methods D. The statement System.out.println( "Hello") is an example of a call to a method of the out object which is contained in the static class System. This method accepts a string as an argument, in this case, "Hello" which is a string literal. The argument is passed to the method which displays it on the monitor E. All programming statements in Java must be part of a class. A class name must conform to specific syntax rules.
F. Java programs may have comments which provide explanations of the program and its details to help programmers understand the code, and to make program modification and maintenance simpler.
|
||
| Extras: | If
you are using Visual J++, follow these instructions:
|
||