How to define auto complete abbreviation for NetBeans (System.out.println() example)

If you want to define a short cut template for the System.out.println() method of Java

You can do it using Code Templates in NetBeans IDE.

Just follow the following path to open Code Template window on NetBeans

Click on Tools>Options

From here, choose the Code Templates section and Click New button on the right

Enter an Abbreviation for System.out.println(); such as sys

and press Enter

Inside the Expanded Text section you should write ${no-indent}System.out.println(“”);

Select code complete method from Expand Template on List such as Enter, Tab…and press OK

Now if you choose Enter for the expand method and if you write on IDE only

sys and press Enter key then Netbeans will complete the code like;