Passing values to main(String args[]) ?
Hi, I saw some code which appeared to pass values to void main(String args[])
and I was wondering how this is done and why it would be done.
example:
Code:
public static void main(String args[]) {
if (args.length < 2) {
System.out.println("some message");
}
Also, where exactly in code do you call the void main(String args[]) function. :confused: I have never seen anything like for example:
Code:
String str="hello";
if(someCondition==true)
{
main(hello);
}
Thanks in advance for any help :)