Args 保证不为空? [英] Args guaranteed to be non-null?

查看:25
本文介绍了Args 保证不为空?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面的程序中,如果执行(例如通过命令行),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.

这篇关于Args 保证不为空?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆