The only difference is that you call main directly from other Java code. The first form allows you to write:
Test.main("first", "second", "third");
whereas for the second you will need to create an array explicitly:
Test.main(new String[] { "first", "second", "third" });
Personally, I donβt think I have ever seen the first form used - calling main from another code is quite rare. There is nothing wrong.
source share