1 April 2014

What is shortcut for comment and uncomment in Eclipse.

Sometimes, we need comment/uncomment some lines of code.
Eclipse has tones of useful shortcuts...and some of them are about comment/uncomment :)

For single line comment (//)
To comment press CTRL + /
To uncomment press  CTRL + / again.

For multi-line  line comments ( /* */)
To comment press CTRL + SHIFT +  /
To uncomment press  CTRL + SHIFT +  \ (WARNING! it is BACKSLASH not FORWARD SLASH like in single line comment)

Just in case:
 / is  a Forwards Slash
\ is a Backslash

I wonder,what were reasons behind design decision behind to use backslash instead of forward slash for multi-line comment.