How to comment a block in Eclipse?

前端 未结 17 2150
一整个雨季
一整个雨季 2020-12-07 08:52

Does Eclipse have a hot key to comment a block? and to uncomment a block?

17条回答
  •  臣服心动
    2020-12-07 09:19

    For JAVA :

    Single line comment:

                   // this is a single line comment
    

    To comment: Ctrl + Shift + C

    To uncomment: Press again Ctrl + Shift + C

    Multiple line comment:

             /* .........
                .........
                ......... */ 
    

    First, select all the lines that you want to comment/uncomment then,

    To comment: Ctrl + Shift + C

    To uncomment: Press again Ctrl + Shift + C

    I hope, this will work for you!

提交回复
热议问题