Intellij IDEA – default static void main shortcut

In IDEA, you can type psvm and press Tab to generate the public static void main(String[] args) automatically.

To show all shortcuts, press CTRL + J

References

  1. Intellij IDEA – Code completion
  2. Intellij IDEA – System.out.println shortcut
author image

mkyong

Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities. Read all published posts by

Comments

avatar
3000
newest oldest most voted
Michel
Guest
Michel

Hey, Tnx for the tip!

SynFlood
Guest
SynFlood

This is really awesome! The best tutorial I’ve ever seen!

Athena
Guest
Athena

type main then enter, can get public static void main(String[] args) as well

Drathir
Guest
Drathir

hi! Is there a way to create my own shortcut for my own template? For example:

psvx + tab == >

public static void someMethod(){

}

or
da + tab ==>
double doubleVal = 12345d;