论坛
提问
用户
提问
×
游客
登录
注册
忘记密码?
为什么Java允许大小为0的数组?
论坛
为什么Java允许大小为0的数组?
17 浏览
2023年2月22日
匿名的
2023年2月23日
0
Comments
为什么Java允许大小为0的数组?
在Java中,数组的长度是固定的。那么为什么Java允许长度为0的数组呢?
String[] strings = new String[0];
0
0
答案
活跃
已投票
最新
最老的
用户名或电子邮箱地址
密码
注册
Lost Password
在Java中,数组是一个对象吗?
为什么Java中的原始数据类型不能为“null”?
如何在C#中初始化一个空数组?
在Java中定义一个固定大小的列表。
静态数组在Java内存中是如何存储的?
为什么数组是对象,但不能用作基类?
如果在C中字符串数组以空字符结尾,为什么其他数据类型的数组没有以空字符结尾?
为什么我们可以将一个字符串赋值给一个简单的Java对象
如何在Java中声明和初始化数组?
Java泛型在ArrayList.toArray()方法中
Collection initialization refers to the process of initializing a collection, such as a list or an array, with a set of values at the time of declaration. It allows for the convenient and concise initialization of collections without the need for extensiv
为什么 new String("") 可以编译通过,而 char c = '' 则不能编译通过?
我们能在Java中假设默认的数组值吗?例如,假设一个int数组的所有元素都被设置为零。
如何在Java中填充数组?
为什么我可以在Java中编辑一个final数组的内容?
Java - 如何创建带有值的字符串数组?
在Java中声明和初始化数组。当在声明中更改数组下标的位置时,数组的行为会有所不同。
Java 1.6:创建一个List
数组
为什么没有String的原始类型?
在Java中的数组初始化