我想String
从ArrayList
. 目前,我只能从ArrayList
. 我的代码:
eachstep = new ArrayList<String>();
for (int i = 0; i < parsedsteps.size(); i++) {
eachstep.add(parsedsteps.get(i).replaceAll("<[^>]*>", ""));
}
for (int i = 0; i < eachstep.size(); i++) {
String directions = i + "."+" "+eachstep.get(i)+"\n"+;
}
给我:
3. This is step 3.
代替:
1. This is step 1.
2. This is step 2.
3. This is step 3.
如何使我的 for 循环String
使用来自的所有值创建一个ArrayList
?