In Java, comments are preceded by two slashes (//) in a line, or enclosed between /* and */ in one or multiple lines. When the compiler sees //, it ignores all text after // in the same line. When it sees /*, it scans for the next */ and ignores any text between /* and */. Let’s look why comments are important in a program. The compiler is not going to compile the statement after the line comment or between comments. So it will skip the statement then the rest will be compiled by the compiler. So you can give any description in comments.
0 Comments:
Post a Comment