Why is the Java main method static?

前端 未结 30 2181
离开以前
离开以前 2020-11-22 01:41

The method signature of a Java main() method is:

public static void main(String[] args){
    ...
}

Is the

30条回答
  •  -上瘾入骨i
    2020-11-22 02:15

    If it wasn't, which constructor should be used if there are more than one?

    There is more information on the initialization and execution of Java programs available in the Java Language Specification.

提交回复
热议问题