Professional Documents
Culture Documents
Boolean Expressions
Boolean Expressions
Java programming
tobias.andersson.gidlund@lnu.se
▶ A part from the earlier operators, there are also logical operators.
▶ They are part of the boolean logic and they are the connective between parts.
▶ They put two part together with a logical meaning.
▶ It is important to remember that the parts that are put together must be evaluated
to true or false.
▶ It is not, for example, possible to use integers as with relations and equality.
▶ After that the whole is evaluated.
▶ The different parts can then be put together to create longer logical expressions.
▶ Example:
aNumber > anotherNumber || anotherNumber > aNumber