【发布时间】:2010-10-17 04:15:17
【问题描述】:
我如何正确声明一个 or 声明我尝试这个没有成功:
【问题讨论】:
我如何正确声明一个 or 声明我尝试这个没有成功:
【问题讨论】:
按位包含 OR --> |
逻辑或 --> ||
所以...
if ( true || false )
{
/* the first expression is evaluated, it is true, we enter the 'if' block */
}
int i = 1 | 0; /* i == 1 */
【讨论】:
根据http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html ||应该管用。使用el时,我一般用'or'代替'||'但我不确定我为什么要这样做。
【讨论】: