Question
IDEA has an Add a Javadoc comment using a context action, which can be used to quickly write Javadocs. However, from IDEA 2026.2, it generates Markdown Javadocs by default:
In projects that use Java 23 or later, this action inserts Markdown documentation comments by default.
Now the Javadoc is like this:
/// @param f
static void foo(Func f) {
f.invoke();
}
How to change it back to normal/classic Javadoc? What want to achieve is this:
/**
* @param f
*/
static void foo(Func f) {
f.invoke();
}
Answer
If you want to use traditional comments instead, open Settings (Ctrl+Alt+S), go to Editor | Code Style | Java | Code Generation | Comment Code, and clear the Prefer documentation line comments option.
Another workaround is that you can type /** before a declaration and press Enter to insert a traditional documentation comment.
Comments
0 comments
Please sign in to leave a comment.