在我的应用程序中,我有400个元素大小的数组。我的任务是将这些元素发送到inserting.But的webservice,而不是supported.So,将数组拆分并发送到webservice.How,是吗
发布于 2012-10-27 10:26:20
也许是这样的吧?
String[] stringArray = new String[400];
//lets assume that the array has objects in it.
int index = 0;
for(int i = 0; i < stringArray.length; i++) {
String[] temp = new String[20];
for(int x = 0; x < 20) {
if(stringArray[index] != null) temp[x] = stringArray[index];
index++;
}
//The temp array is filled with objects from the other array, so send it to the webservice.
sendArrayToWebService(temp);
}
https://stackoverflow.com/questions/13099097
复制