Java Reference
In-Depth Information
figure 3-16
figure 3-17
How It Works
Here's how it works:
1.
In Eclipse, every Java project is stored in its own location, referred to conveniently as a
project
.
You created your first project called
MyFirstJavaProject
to store all the components required for
the project in this exercise.
2.
Next, you created a package. A package acts as a folder for related class files.
3.
You created a class and placed it inside this package. The first line of your class reads
package
myPackage;
and indicates where the class is located. The word
package
is a keyword in Java, so it
is shown in a bold purple font to highlight it.
4.
After the package declaration, there are a few lines of code that start with
/**
and end with
*/
.
These are special symbols that indicate a block comment. Comments are not compiled or executed,
Search WWH ::
Custom Search