codegurukool.com · Free coding tutorials & online compiler

Home › Java Tutorial › Java comments

Java comments

Notes for humans.

// comments one line and /* ... */ comments many lines. /** ... */ is a Javadoc comment used to generate documentation.

Example code

public class Main {
  public static void main(String[] args) {
    // single line
    /* multi
       line */
    System.out.println("Comments ignored");
  }
}

Run this code in the online editor

← Java outputJava variables →