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");
}
}