河南成教 / 河南理工大学
3[分析题]
下面程序是否有错?如果有错试标出错误位置并指出是何种错误。
程序:
class c {
static int x = 20;
int y = 30;
static int plus() {
return x y;
}
public static void main(String [] args ) {
int result = plus();
System.out.println(“result = “ result);
3[分析题]
下面程序是否有错?如果有错试标出错误位置并指出是何种错误。
程序:
class c {
static int x = 20;
int y = 30;
static int plus() {
return x y;
}
public static void main(String [] args ) {
int result = plus();
System.out.println(“result = “ result);
参考答案:
佳题速递: