Java: Comment Syntax

By Xah Lee. Date: . Last updated: .

Java Comment Syntax

comments are ignored.

// this a comment, to end of line

// another comment. yes
/*
block comment syntax.
can be multiple lines.

Useful for commenting out block of code.
*/

/* 
block comment cannot be nested
*/