Java in a Nutshell

Previous Chapter 2
How Java Differs from C
Next
 

2.3 Comments

Java supports three types of comments:

Since C-style comments do not nest, it is a good idea to use C++-style // comments for most of your short comments within method bodies. This allows you to use /* */ comments to comment out large blocks of code when you need to do that during development. This is especially important because, as you will see, Java does not support a preprocessor that allows you to use #if 0 to comment out a block.


Previous Home Next
The Name Space: Packages, Classes, and Members Book Index No Preprocessor

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java


Banner.Novgorod.Ru