Operator
|
Description
|
Example
|
== (equal to)
|
Checks if the values of two operands are equal or
not, if yes then condition becomes true.
|
(A == B) is not true.
|
!= (not equal to)
|
Checks if the values of two operands are equal or
not, if values are not equal then condition becomes true.
|
(A != B) is true.
|
> (greater than)
|
Checks if the value of left operand is greater
than the value of right operand, if yes then condition becomes true.
|
(A > B) is not true.
|
< (less than)
|
Checks if the value of left operand is less than
the value of right operand, if yes then condition becomes true.
|
(A < B) is true.
|
>= (greater than or
equal to)
|
Checks if the value of left operand is greater
than or equal to the value of right operand, if yes then condition becomes
true.
|
(A >= B) is not true.
|
<= (less than or equal
to)
|
Checks if the value of left operand is less than
or equal to the value of right operand, if yes then condition becomes true.
|
(A <= B) is true.
|
&& (logical and)
|
Called Logical AND operator. If both the operands
are non-zero, then the condition becomes true.
|
(A && B) is false
|
|| (logical or)
|
Called Logical OR Operator. If any of the two
operands are non-zero, then the condition becomes true.
|
(A || B) is true
|
! (logical not)
|
Called Logical NOT Operator. Use to reverses the
logical state of its operand. If a condition is true then Logical NOT
operator will make false.
|
!(A && B) is true
|
whaust
2019年12月29日 星期日
Java Boolean Operator
訂閱:
張貼留言 (Atom)
Popular
-
При планировании проекта разработки программного обеспечения я часто сталкиваюсь с помощником, который задает мне вопрос: в чем разница межд...
-
今天你的老爸我將談論兩種技術,Cisco vPC: Virtual Port Channel (虛擬端口通道) 和 VSS:Virtual Switching system (虛擬交換系統)。 這兩種技術在各自領域的工作方式不同。 你們不用一直Google去查,我在這兒把它們之...
-
Top 20 Threats Top 100 Threats --------------------------- NTP Amplification REQ_MON_GETLIST Request Found NTP Amplification Denia...
沒有留言:
張貼留言