java: 非法的表达式开始
class ex4_5{public static void main(String[]args){
public static int moveAuto( int n){
if (n==1)
return 1;
else
return n*moveAuto(n-1);
}
System.out.print(moveAuto(4));
}
}
代码如上
方法中不能嵌套方法
class ex4_5{
public static void main(String[]args){
System.out.print(moveAuto(4));
}
public static int moveAuto( int n){
if (n==1)
return 1;
else
return n*moveAuto(n-1);
}
} 路过 66666666666666666 66 isdkz 发表于 2022-4-7 23:03
方法中不能嵌套方法
感谢 66666 方法中不能嵌套方法 离谱奥你这么写
页:
[1]