I have a need to include */ in my JavaDoc comment. The problem is that this is also the same sequence for closing a comment. What the proper way to quote/escape
Nobody mentioned {@literal}. This is another way to go:
/**
* Returns true if the specified string contains "*{@literal /}".
*/
Unfortunately you cannot escape */ at a time. With some drawbacks, this also fixes:
The only downside is that this isn't all that readable when viewing the code directly in a text editor.