~/ learn/ comp-308/ cards/ Javadoc: doc comments to HTML API docs
1 of 5

Type a method doc comment with @param, @return, and @throws

Type a method doc comment with @param, @return, and @throws

Answer

/** * Schedules an event after a delay. * * @param event the event to run; must not be null * @param delayMs delay in milliseconds before firing * @return the id assigned to the event * @throws IllegalArgumentException if event is null */

The first sentence is the summary. One @param per parameter in order, @return for the value (no @return on void), @throws naming the exception and the condition.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/27f5163f-390e-4c37-893d-a9e195435bba/flashcard utf-8 LF