String sendDocNum = ""; for (DocNum docNum: docNumList) { sendDocNum+ = docNum.toString() + ","; } if (sendDocNum.length() > 0) { //sendDocNum.length() - 1 的原因:从零开始的,含头不含尾。 sendDocNum = sendDocNum.substring(0, sendDocNum.length() - 1); }
String sendDocNum = ""; for (DocNum docNum: docNumList) { sendDocNum+ = docNum.toString() + ","; } if (sendDocNum.length() > 0) { //sendDocNum.length() - 1 的原因:从零开始的,含头不含尾。 sendDocNum = sendDocNum.substring(0, sendDocNum.length() - 1); }