Re: suppress compile error



Patricia Shanahan wrote:

Also, Eclipse has a "toggle comment" feature that comments or uncomments
a selected section of code in one action. I usually prefer it because
the removed code does not have to be compilable.

I'm sure other IDEs have similar features.

Yup. :)

NetBeans, you can highlight a block of code -- you don't have to do it perfectly, just part of the first and last line will do -- and press control-/ and presto!

This adds // in front of each line of code that was selected or partially selected.

Press control-/ again to uncomment the block.
.