Java comments are the statements that are not executed by a compiler and interpreter. The comments can be used to provide the information or explanation about a variable, method, class, or any statement. It can also be used to hide program code for a specific time.

How To Write Comments In Java

In the program, comments take part in making the program more human-readable by placing a detail of code involved, and proper use of the comments makes maintenance easier and finding bugs quickly. Comments are ignored by a compiler while compiling the code.

There are mainly three types of comments in Java.

  1. Single-Line Comment
  2. Multi-Line Comment
  3. Documentation Comment

#java #programing

How To Write Comments In Java Example Tutorial
1.70 GEEK