I need main() method generation

Answered

I created new project, new class (Main.java) and must write "

public static void main(String[] args){}

"

It will be good if will possible generation main method by IDE.

6
6 comments

This does not work. IntelliJ 2019.3. I get something like Upsert instead

0

Please share the screenshot of the issue. What file type do you use? Note that for Java you can now also type main instead of psvm.

1

I was in JShell, so .snippet file?

0

Live templates do not work in JShell. Normally you don't even have a class there and you just run any statement, so you don't need a class or a main method in JShell.

1

Ah, good to know, thanks!

0

Please sign in to leave a comment.