As we all know, the entry of a
Java class is usually defined as
public static void main(
String[] args)
My question is, why the compiler doesn't complain when I defined it as the topic of this message, that is:
public static void main(String args)
Provided a function expects a String array and we give it a String method, it will not compile.
public class
Test {
public static void main(String[] args)
{
CallAFunction("test"); //it won't compile
}
private void CallAFunction(String[] paras)
{
//do sth. here
}
}
Could anybody tell me why, thank you very much!