|
Commenting Your CodePosted: Jan 8, 2007 Last modified: Feb 3, 2009Programmers can place comments (sometimes called remarks) in their code that help explain what is going on. These comments are not executed as program statements. It is common for novice programmers to underestimate the value of commenting code. Through bitter experience most come to learn this good practice after attempting to read another programmer's code or their own several months down the line. In a text editor that supports syntax highlighting, comments will typically be displayed in an unobtrusive colour & sometimes in italics. There are several styles of commenting code. Here's a small selection: HTML comment: C-style single line comment: C-style multi-line comment: Special JavaDoc comments (these are picked up by the Java documentation system): VB comment: Perl comment |