The main()
method in a java program takes a String array argument.
public static void main(String[] args) {}
If you do not use the variable args
inside of main() you could just pass null to it. Otherwise you would need to pass a String array to the method.
However, you should not be calling the main()
method from inside your application. The main()
method should be used as an entry point into your application, to launch a program, not be used to recursively execute the logic inside that application. If you have functionality needed again you should put it in a separate method.