JAVA里for(int a:b)public class arrs {\x09\x09 int[] a\x09=\x09{\x0910,1,5,2,4,3,8,7,6,9\x09};\x09\x09 for\x09(int b:a){\x09\x09 System.out.print(b);\x09\x09 }}提示Syntax error on token "for", Identifier expected,

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 07:43:23
JAVA里for(int a:b)public class arrs {\x09\x09    int[] a\x09=\x09{\x0910,1,5,2,4,3,8,7,6,9\x09};\x09\x09    for\x09(int b:a){\x09\x09        System.out.print(b);\x09\x09    }}提示Syntax error on token
x)r s|ޓ_~OGf^B=,(MLVHI,.VH,**V0a *UHqmAX@PTHDXB\LY+.Sd[U& \Y\_ZWPTb@m ϗ +IPH-*/RS(NSPWZZQ\cT`Yˑw^C0B.K((0ւE $%!c_`g3%XKK2PڲVb+4Y&Ag(&fi]2(׬%VBQ rVߴٜ';v?O.x6c=Di<ȳ/O}>F 1.d

JAVA里for(int a:b)public class arrs {\x09\x09 int[] a\x09=\x09{\x0910,1,5,2,4,3,8,7,6,9\x09};\x09\x09 for\x09(int b:a){\x09\x09 System.out.print(b);\x09\x09 }}提示Syntax error on token "for", Identifier expected,
JAVA里for(int a:b)
public class arrs {\x09
\x09 int[] a\x09=\x09{\x0910,1,5,2,4,3,8,7,6,9\x09};
\x09
\x09 for\x09(int b:a){
\x09\x09 System.out.print(b);
\x09\x09 }
}
提示Syntax error on token "for", Identifier expected,

JAVA里for(int a:b)public class arrs {\x09\x09 int[] a\x09=\x09{\x0910,1,5,2,4,3,8,7,6,9\x09};\x09\x09 for\x09(int b:a){\x09\x09 System.out.print(b);\x09\x09 }}提示Syntax error on token "for", Identifier expected,
public class arrs {
static int[] a={10,1,5,2,4,3,8,7,6,9};
public static void main(String[] args){
 for(int b:a){
 System.out.print(b);
 }
}
}
没有主方法你是没有办法测试的