Comments in Java
Posted by 
Ravi Kumar at Saturday, February 28, 2009
| Share this post: | 
0 Comments
Like comments in other languages (c,c++), java also supports comments in the program.
Comments are not shown in the executable program. 
The most common method of comment in java is //. You use this for a comment that will run from the // to the end of the line.
Ex: // This is my first program
Another method is /* and */ comment. You use this for a comment that will run from /* to */.
Ex: /* This is my first program
       This is another way of comment */