部分关键代码如下:
List line;
String str;
for(int i=0;i
line = strs.get(i);
for(int j=0;j
str = line.get(j);
System.out.println(str);//遍历
}
List find_result = new ArrayList<>();
if (result) {
matchTime++;
for(int i=1; i <=m.groupCount(); i++){
find_result.add(m.group(i));
}
strs.add(find_result);
}
return matchTime;
java循环 想在每个循环输出前加入不同字符串应该怎么搞
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
- ziyejinwei1994 2018-09-21 07:56关注
加不通的字符串?两个for循环试试呗
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报