Comments in Java

Comments are used to explain code and are ignored by the compiler.

Single-line Comment

// This is a single-line comment

Multi-line Comment

/*
 This is a
 multi-line comment
*/

Documentation Comment

/**
 * This is a documentation comment
 * @author Your Name
 */