对于下面的源程序,哪些选项的结论是正确的?
public class J_Test{
public static void main(String args[]){
int x=2,y=2;
if(++x == y++) System.out.println("x=y");
else System.out.println("x!=y);
}
}
A 程序输出“x=y”
B 程序输出“x!=y”
C 程序无法通过编译
D 程序可以通过编译,但无法正常运行
public class J_Test{
public static void main(String args[]){
int x=2,y=2;
if(++x == y++) System.out.println("x=y");
else System.out.println("x!=y);
}
}
A 程序输出“x=y”
B 程序输出“x!=y”
C 程序无法通过编译
D 程序可以通过编译,但无法正常运行