javarevisited

javarevisited


Eclipse shortcut to comment uncomment single line and block of code - Eclipse Tips Tricks

Posted: 11 Dec 2012 03:47 AM PST

Knowing Eclipse shortcut to comment and uncomment single line or block of code can save you lot of time while working in Eclipse. In fact I highly recommend every Java programmer to go through these top 30 Eclipse shortcut and  10 java debugging tips in Eclipse for improved productivity.  If you are Java programmer, coding in Eclipse and want to comment and uncomment single line or block of code quickly you can either use ctrl + / to comment a single line and subsequently uncomment a commented line. If you want to comment a block of code or a complete method, you have two option you can either line comment (//) all those selected lines or block comment (/* */) those lines. For line comment multiple line, select multiple line and press ctrl + /, it will put // in front of every line. For block commenting in Eclipse, first select all the lines or code block you want to comment and then enter ctrl+shift+/ it will put /* on first line and */ on last line. Here is better illustrated example of commenting and uncommenting Java code in Eclipse IDE :
Read more »


Post a Comment