why should the result be "5"?
来源:百度知道 编辑:UC知道 时间:2024/05/26 09:53:37
int x = 5;
x = x++;
System.out.println(x);
x = x++;
System.out.println(x);
怎么又是这个问题!
它是这么执行的
int temp = 5;//即x++;这个表达式的值
x++;//此时x的6
x = temp;//将表达式的值赋给x
这个问题在《java解惑》一书中有详细解释
要多看书啊,不能凭空想象
Why a company should produce the corporate social responsibiliti report?
翻译一下Why should I get a bad ending for the sake of love?
What attitude should we take towards the misfortune in life? why?
Should English be used as the first language on internet? why?
If the University must cancel one of the schools sports , which one should it be ? and why ?
Why should I like English?
why should you be sorry?
why should we learn English
why should we learning english??
but it is less clear,to take the question of his subtitle,why we should,like care.翻译 05t4