Professional Documents
Culture Documents
New Text Document
New Text Document
com
when condition
Certainly! Here are some common comparison statements and operators that you might
encounter in programming for future reference:
4. Logical Operators:
- `&&` (AND): Used to combine two or more conditions, and the result is true if
all conditions are true.
- `||` (OR): Used to combine two or more conditions, and the result is true if
at least one condition is true.
- `!` (NOT): Used to negate a condition, turning `true` into `false` and vice
versa.
5. String Comparison:
- `==` and `!=`: Used to compare strings for equality or inequality.
- `.equals()` (for some languages like Java): Used to compare strings for
equality.
6. Ternary Operator:
- `condition ? valueIfTrue : valueIfFalse`: Used to assign a value based on a
condition. If the condition is true, the first value is assigned; otherwise, the
second value is assigned.
These are some of the common comparison statements and operators used in
programming. Keep in mind that the syntax and usage of these statements may vary
depending on the programming language you are working with.
http://www.manapega.com/117149_PE_8.7.zip