Lesson: A Closer Look at The "Hello World!" Application: Trail: Getting Started
Lesson: A Closer Look at The "Hello World!" Application: Trail: Getting Started
Lesson: A Closer Look at the "Hello World!" Application (The Java Tutorials > Getting Started)
The "Hello World!" application consists of three primary components: source code comments, the H e l l o W o r l d A p pclass definition, and the m a i nmethod. The following explanation will provide you with a basic understanding of the code, but the deeper implications will only become apparent after you've finished reading the rest of the tutorial.
Comments are ignored by the compiler but are useful to other programmers. The Java programming language supports three kinds of comments:
/ *t e x t* /
This indicates a documentation comment (doc comment, for short). The compiler ignores this kind of comment, just like it ignores comments that use / *and * / . The j a v a d o ctool uses doc comments when preparing automatically generated documentation. For more information on j a v a d o c , see the Javadoc tool documentation .
/ /t e x t
The compiler ignores everything from / /to the end of the line.