JAVA中报错i cannot be resolved to a variableimport java.util.ArrayList;public class Test5 { public static void main(String[] args) {ArrayList strs =new ArrayList();strs.add("ABC");strs.add("DEF");strs.add("HIJ");for(int i=strs.size()-1;i>=0

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/25 22:39:30
JAVA中报错icannotberesolvedtoavariableimportjava.util.ArrayList;publicclassTest5{publicstaticvoidmain(S

JAVA中报错i cannot be resolved to a variableimport java.util.ArrayList;public class Test5 { public static void main(String[] args) {ArrayList strs =new ArrayList();strs.add("ABC");strs.add("DEF");strs.add("HIJ");for(int i=strs.size()-1;i>=0
JAVA中报错i cannot be resolved to a variable
import java.util.ArrayList;
public class Test5 {

public static void main(String[] args) {
ArrayList strs =new ArrayList();
strs.add("ABC");
strs.add("DEF");
strs.add("HIJ");
for(int i=strs.size()-1;i>=0; i--);
System.out.println(strs.get(i));
}}

怎么回事啊

JAVA中报错i cannot be resolved to a variableimport java.util.ArrayList;public class Test5 { public static void main(String[] args) {ArrayList strs =new ArrayList();strs.add("ABC");strs.add("DEF");strs.add("HIJ");for(int i=strs.size()-1;i>=0
没错啊,在我电脑上没有错误