English 中文(简体)
Java的比喻和(和)表述
原标题:Bitwise AND (&) expression in Java

我在“代码>expr1 &”中编成的缩略代码;在<代码>expr1上具有副作用,影响到<代码>expr2评价结果。 我怀疑,<代码>ex 2在expr1 之前得到评价,因为“生命线”保障对<代码>和>的左对右对评价;&,但不一定是<代码>&。 我还怀疑,评价命令的改变可能是热点公司优化的结果(我们改用Java 6u20)。 你们是否知道热点能够使这种优化? 更有甚者,为证明或消除怀疑的文件提供点。 提前感谢。

EDIT:由于有人提议改写该法典,使之既正确又可读——但我已经这样做了,因此它不是我所期待的。 不幸的是,很难检验这一变化,这就是为什么我在这里提出这个问题。

最佳回答

评价令在 rel=“nofollow noreferer”>上作了明确界定::

Java方案语言保证,从左边到右边,经营者的歌剧似乎在具体的评价命令中进行评估。

热电站优化器不应优化使用,如果结果发生变化,则在花费之前对插图2进行评估。 如果是这样的话,就是一个ug。

建议守则不以这一具体特征为关键。

你的法典可以更明确地改写如下:

int a = expr1;
int b = expr2;
int result = a & b;
问题回答

JLS 3rd edition 第15.7节就评价命令进行会谈,但要求不要以批评的方式依赖评价命令(就简而言之)。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签