Why this matters
Javadoc powers IDE help and stable API contracts.
All public classes, interfaces, and methods must include Javadoc with a summary sentence, @param for each parameter, @return when not void, and @throws where applicable.
Javadoc powers IDE help and stable API contracts.
Side-by-side examples engineers can pattern-match during review.
public class UserService {
public User find(String id) { ... }
}/* Service for user retrieval. /
public class UserService {
/**
* Find a user by ID.
* @param id external identifier
* @return the user
* @throws NotFoundException if no user exists
/
public User find(String id) { ... }
}/ Compute sum. @param a @param b @return sum /
public int add(int a, int b){ return a + b; }public int add(int a, int b){ return a + b; }From the same buckets as this rule.