What is the Eclipse shortcut for "public static void main(String args[])"?
I know a cool shortcut for System.out.println()
: sysout Ctrl + Space.
Is there something similar for public static void main(String args[])
?
Solution 1:
This is just main
and Ctrl-Space.
Solution 2:
In Eclipse, select preferences.
In preferences, look for Java/Editor/Templates.
Here you will see a list of all of them. And you can even add your own.
Solution 3:
Just type ma
and press Ctrl + Space, you will get an option for it.
Solution 4:
As bmargulies mentioned:
Preferences>Java>Editor>Templates>New...
Now, type psvm then Ctrl + Space
on Mac or Windows.
Solution 5:
Type main
and press and hold Ctrl and next press Space Space (double space) and select, it or pressenter to focus on main option.
This is fastest way.