从左到右插入不懂,for循环for(int i = 3; i <str.length(); i=i+4)求解释
StringBuilder str = new StringBuilder();
str.append("jaewkjldfxmopzdm");
// 从左到右每隔三位插入逗号
for(int i = 3; i <str.length(); i=i+4){
str.insert(i,",");
}
StringBuilder str = new StringBuilder();
str.append("jaewkjldfxmopzdm");
// 从左到右每隔三位插入逗号
for(int i = 3; i <str.length(); i=i+4){
str.insert(i,",");
}
2015-08-25
举报