Posted in 面试题 onMay 05, 2016
int a = 22;
int b = 11;
a = b + (b = a) * 0;
答案:a=11 b=22
public class InterviewDemo {
public static void main(String[] args) {
int a = 22;
int b = 11;
a = b + (b = a) * 0;
System.out.println(a);
System.out.println(b);
}
}
int b = 11;
a = b + (b = a) * 0;
答案:a=11 b=22
public class InterviewDemo {
public static void main(String[] args) {
int a = 22;
int b = 11;
a = b + (b = a) * 0;
System.out.println(a);
System.out.println(b);
}
}
请问如下代码执行后a和b的值分别是什么
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@