Practice keyboard shortcuts to generate code while editing a Java source file.
Key sequences to practice:
- ⌘N (Command + N) - open the "generate code" dialog
- ⌘Z (Command + Z) - undo changes
Steps
- Open the file src/main/java/com/neopragma/idekatas/LongConditional.java
- Select a block of code, such as an if/else block.
- Press ⌘N (Command + N) to open the "generate code" dialog.
- Select "try/catch" from the list.
- Select another block of code.
- Select "synchronize" from the list.
- Repeat until bored.
- Press ⌘Z (Command + Z) to undo the changes.