Class 1, Part 2 |
Intro to Java 30-IT-396 |
|
A Closer Look at your First
Program
-
Java is case sensitive.
-
Comments
-
// A single line comment.
-
/*
Multiple line comments.
*/
- Defining the class: public is a class modifier.
-
A .java file may have no more than one public class. It can have
multiple non-public classes, but we'll get in to that much later.
-
The class keyword, followed by the class name (HelloWorld) and the {,
states the beginning of the class.
-
The class ends with the counterpart }.
-
Nearly all of the code falls between those two braces, except...
-
import and package statements
-
certain inner classes
-
But we'll get into those much later.
A closer look at public static void
main(String
args[]) {


Created by: Brandan
Jones
December 17, 2001