1. Comment a line (the shortcut key in eclipse is: crtl /). Press the shortcut key once to comment, and press it again to uncomment
//内容 //内容
2. Comment multiple lines and block comments (the shortcut key in eclipse is: crtl shift /). Press the shortcut key once to comment, and press it again to cancel the comment. It can only be deleted manually.
/*内容 内容 内容*/
3. Document comments (the shortcut key in eclipse is: /** enter). Click the shortcut key to comment. Only this comment method can be written into the javadoc document
/** 内容 *内容 *内容 */
Note:
The comment content is not edited, it is just an explanation Note;
Comment, for easier reading;
For each single-line comment or multi-line comment, you must select the content to be commented.
Recommended tutorial: Java tutorial
The above is the detailed content of What are the annotation methods in java. For more information, please follow other related articles on the PHP Chinese website!