java-split
java string to html combo
String arrS[] = Input[i][44].split(",");
for (int r=0;r<arrS.length/2;r++){
int i1=r*2;
int i2=r*2+1;
out.println("<option value='"+arrS[i1].trim()+"'>"+arrS[i2].trim()+"</optin><!--20131104-->");
}
java string to array
String str="aaa,bbb,ccc";
String arrayName[] = str.split(",");
for (int i= 0; i < arrayName.getLength(); i++) {
// do something;
}
沒有留言:
張貼留言