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/15 02:02:27

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
没错啊,在我电脑上没有错误