Eclipse provides many coding templates to improve the speed and consistency for writing code. To use these templates first write the starting characters of the template and then press ctrl+space. For example in eclipse editor type tr and then press ctrl+space, it will add try catch block to that place.
You can add your own template also. Suppose if you need try-catch-finally as a template. To add this template in the eclipse following steps are required.
First go to the menu entry Window -> Preference, Preference window will open. In the preference window go for the Java -> Editor -> Templates. Then click on the New button as shown in the diagram. Write the new template in the New Template window.
Now you can use your custom template in the program like any other template by pressing ctrl+space.