Java拼图 [英] Java Puzzles

查看:94
本文介绍了Java拼图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

括号仅影响评估顺序,但在一种情况下除外。

那是什么情况?

Parentheses affect the order of evaluation only, except in one situation.
What''s that situation?

推荐答案

使用时在例如的非算术上下文中if(...),while(...),for(...)?


亲切的问候,


Jos


ps。第二个想法:它没有改变a +(b * c)中评价的顺序。要么......
When used in a non-arithmetic context as in e.g. if( ... ), while( ... ), for( ... )?

kind regards,

Jos

ps. on second thought: it doesn''t change the order of evaluation in "a+(b*c)" either ...



当在非算术上下文中使用时,例如if(...),while(...),for(...)?


亲切的问候,


Jos


ps。第二个想法:它没有改变a +(b * c)中评价的顺序。要么...
When used in a non-arithmetic context as in e.g. if( ... ), while( ... ), for( ... )?

kind regards,

Jos

ps. on second thought: it doesn''t change the order of evaluation in "a+(b*c)" either ...



在非算术上下文中使用时听起来正确但不是我想要的。


即使他们不改变该表达式中的顺序,也可以使用它们来指定评估顺序。


有一个括号表达式中的实例,其中使用它们可以在不改变评估顺序的情况下改变语句的含义(甚至是正确性)。

When used in a non-arithmetic context sounds correct but is not what I was looking for.

Even if they do not change the order in that expression, their use there is for specifying the order of evaluation.

There is an instance in parenthesized expressions where using them acts to change meaning of a statement (correctness even) without changing the order of evaluation.



有括号表达式中的实例,使用它们可以在不改变评估顺序的情况下改变语句的含义(甚至是正确性)。
There is an instance in parenthesized expressions where using them acts to change meaning of a statement (correctness even) without changing the order of evaluation.



你的意思是*没有*那些括号中的语句/表达式是什么?b $ b语法/语义不正确?或者你的意思是愚蠢的:

Do you mean that *without* those parentheses that statement/expression is
syntactically/semantically incorrect? Or do you mean something silly as:

展开 | 选择 | Wrap | 行号


这篇关于Java拼图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆