Main Tutorials

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

About Author

author image
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.

Comments

Subscribe
Notify of
6 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Athena
3 years ago

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

Pinky G
3 years ago

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

Drathir
4 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
5 years ago

Hey, Tnx for the tip!

SynFlood
5 years ago

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

Ali
2 years ago

Thanks