Exception in thread "main" java.lang.Error: 无法解析的编译问题 i cannot be resolved to a variable
importjava.util.Arrays;publicclassHellojava{publicstaticvoidmain(String[]args){intarr...
import java.util.Arrays;
public class Hellojava{
public static void main(String[] args) {
int arr[]=new int[]{14,20,36};
int newarr[]=Arrays.copyOf(arr,5);
for(int i=0;i<arr.length;i++);{
System.out.println(arr[i]);
}
}
}
为什么这样会提示i cannot be resolved to a variable? 展开
public class Hellojava{
public static void main(String[] args) {
int arr[]=new int[]{14,20,36};
int newarr[]=Arrays.copyOf(arr,5);
for(int i=0;i<arr.length;i++);{
System.out.println(arr[i]);
}
}
}
为什么这样会提示i cannot be resolved to a variable? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询