Programmer's Guide to Snippets


JEP 413 adds a JavaDoc feature to improve support for code examples in API documentation to JDK 18 and later. This guide provides information on how to use the feature, using a series of simple examples …

More at https://docs.oracle.com/en/java/javase/18/code-snippet/index.html