📅  最后修改于: 2022-03-11 14:52:09.299000             🧑  作者: Mango
0 means you are trying to access index 0 which is invalid, which in turn means the array is empty.
String[] names = new String[0]; // thats the problem
String[] names = new String[somelength];//this is true usage