int test [] = new int [0]是什么意思? [英] What does int test[] = new int[0] mean?

查看:62
本文介绍了int test [] = new int [0]是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以上内容还会创建一个元素吗?

Will the above still create one element?

推荐答案

否.

如果您尝试向该数组添加任何内容,则会得到IndexOutOfRangeException.

You'll get an IndexOutOfRangeException if you try to add anything to that array.

这篇关于int test [] = new int [0]是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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