为什么Java允许大小为0的数组?

17 浏览
0 Comments

为什么Java允许大小为0的数组?

在Java中,数组的长度是固定的。那么为什么Java允许长度为0的数组呢?

String[] strings = new String[0];

0