赵云人物情节?:JAVA一道简单选择题

来源:百度文库 编辑:高考问答 时间:2024/05/05 18:45:17
public class IfTest{
public static void main(String arg[]){
int x=3;
int y=1;
if(x=y)
System.out.println("not equal");
else
System.out.println("equal");
}
}
what is the result?

A the output is "equal"
B the output is "not equal"
C An error at line5 causes compilation to fail
D the program executes but does not print a message

C 行5的if(x=y)应该变成 if (x==y)

c 我同意
我有编译过啊!

C