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

mkyong

Founder of Mkyong.com, passionate Java and open-source technologies. If you enjoy my tutorials, consider making a donation to these charities.

6 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Athena
6 years ago

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

Pinky G
5 years ago

from intellij type , psvma to get main method with arguments in Kotlin

Drathir
7 years ago

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;

Michel
7 years ago

Hey, Tnx for the tip!

SynFlood
8 years ago

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

Ali
4 years ago

Thanks