There are two types of Java annotations
/ / and / *… * /
IntelliJ IDEA can comment the code using the following shortcut keys:
-
Ctrl+/: For single line comment (//…)
-
Ctrl+Shift+/: Block comment (/
…
/)
Java annotation types
If you don’t understand the single-line and block comments above.
Just look at the graph below:
Usually in ides, different annotation types have different colors.
In gray are line comments.
The e trick here is that you don’t need per-line selection if you want to comment multiple lines consecutively at once.
You can use the shortcut key to comment out the selection once.
The figure below shows multiple lines commented out at once.
To uncomment consecutive lines, select the commented out line and type Ctrl+/ again.
The figure above shows before and after in a quick comment.
In the first large figure, what is shown is normally used as a document in Java.
In most cases, line comments are likely to be used more frequently.
www.ossez.com/t/intellij-…