FunTEST.java:24: 错误: 需要class, interface或enum
public static int getSum(int x, int y)
^
FunTEST.java:27: 错误: 需要class, interface或enum
}
^
public static int getSum(int x, int y)
{
return (x+y);
}
class FunTEST
{
public static void main(String[] args)
{
int sum;
sum = getSum(3,4);
System.out.println("sum="+sum);
}
}
上面的代码出现的编译错误,需要查找代码的错误 |