Skip to content
AgileLogics
2 min read

Comments & Code Style

Prerequisites: ArrayList & collections basics

// A single-line comment

/*
 * A multi-line comment
 */

/**
 * A Javadoc comment — documents a class or method, and can be
 * turned into HTML documentation by the `javadoc` tool.
 * @param name the person to greet
 */
void greet(String name) { }

Convention: PascalCase for class names, camelCase for methods and variables, UPPER_SNAKE_CASE for constants (static final fields).