JAVA里的注釋
- 編寫代碼時斩跌,代碼量較少的情況下腿短,我們還是可以看懂自己寫的內(nèi)容;但是當項目結構復雜起來萝风,我們就需要用到注釋
- 注釋不會被運行,只是給程序員看的
- 書寫注釋是一個非常好的習慣
Java中的注釋有三種:
-
單行注釋
//單行注釋
-
多行注釋
/* 多行注釋 多行注釋 */
- 文檔注釋
/**
文檔注釋
_ooOoo_
o8888888o
88" . "88
(| -_- |)
O\ = /O
____/`---'\____
.' \\| |// `.
/ \\||| : |||// \
/ _||||| -:- |||||- \
| | \\\ - /// | |
| \_| ''\---/'' | |
\ .-\__ `-` ___/-. /
___`. .' /--.--\ `. . __
."" '< `.___\_<|>_/___.' >'"".
| | : `- \`.;`\ _ /`;.`/ - ` : | |
\ \ `-. \_ __\ /__ _/ .-` / /
======`-.____`-.___\_____/___.-`____.-'======
`=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
佛祖保佑 永無BUG
*/
關鍵字
abstract | assert | boolean | break | byte |
---|---|---|---|---|
case | catch | char | class | const |
continue | default | do | double | else |
enum | extends | final | finally | float |
for | goto | if | implements | import |
instanceof | int | interface | long | native |
new | package | private | protected | public |
return | strictfp | short | static | super |
switch | synchronized | this | throw | throws |
transient | try | void | volatile | while |