In eclipse we can surround a piece of code with try/catch. I want to surround a piece of code with if statement. Is there any shortcut key. Pressing Ctrl + 1 after selecting the block of code did not give me hint to surround with If
.
Highlight the block of code , press Alt+Shift+Z, then choose if (3).
In Eclipse Galileo
Surround with
option from the context menuif statement
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With