Args 保证不为空?

2022-01-16 00:00:00 jvm java

在下面的程序中,如果执行(例如通过命令行),args JVM 是否独立保证不为空?

In the following program, if this is executed (e.g. via command line), is args JVM independently guaranteed to not be null?

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

推荐答案

简短回答:是的,它的长度可能为 0 但不会为空.

Short answer: yes, it may have length 0 but will not be null.

相关文章