Need of String args[] in main()

Hai all, i had a small doubt regarding the usage of String args[] in main function. When we are not passing any parameters to the program also, we have to give this String args[]. why should we do so. I mean when we pass some arguements to the program then there is the usage of String args[] but when we are not passing also, we have to give String args[] in the main function. why is it made mandatory?

[411 byte] By [autoa] at [2007-10-3 5:56:11]
# 1
That's less a doubt than a question.But anyway the JVM starts up by looking for a method with that signature then calling it.The JVM can't know in advance whether or not the parameters are necessary -- it's only after the method starts running that the parameter usage is clear.
paulcwa at 2007-7-15 0:37:23 > top of Java-index,Java Essentials,New To Java...
# 2
its a method signature for the entry point of your application
angeles1016a at 2007-7-15 0:37:23 > top of Java-index,Java Essentials,New To Java...
# 3

There is only one method signature that the JVM will call. This is part of the Java specification.

The String[] args parameter represents the command line arguments. If there were none, the array will be empty.

Think about it: imagine there were two versions, one with and one without the String[] args parameter, and your application doesn't expect any command line arguments, so it implements only the version with no parameter at all. What would happen if the user decides to provide some command line arguments just for fun?

Herko_ter_Horsta at 2007-7-15 0:37:23 > top of Java-index,Java Essentials,New To Java...