Java Eclipse shortcut for & ldquo; Printf & rdquo;

advertisements

When coding in Java in Eclipse, is there a shortcut similar to typing "syso" and pressing CTRL+Space for System.out.println(), but for printf instead of println?


you can create your own using eclipse template functionality.

To create your own template take a look here Window->Preferences->Java->Editor->Templates.

For example the sysout functionality has this template:

System.out.println(${word_selection}${});${cursor}

you can create similar for System.out.print()