Java Comments - The Coding Shala
Home >> Learn Java >> Java Comments
In every programming, language comments are used for understanding the program. Comments are human-readable and ignored by the compiler. In Java there are three types of comments:
1. Single-line comments
2. Multi-line comments
3. Documentation comments
Single-line and Multi-line comments are often used in programs.
Single-line comments are used to comment single in the program. Single-line comment starts from //.
Multi-line comments are used to comment more than one line at once. Using multi-line comments we can comment single line or a part of the program. Multi-line comments start with /* and end with */ and between this every line ignored by the compiler.
Other Posts You May Like