Class 1, Part 2 |
Intro to Java 30-IT-396 |
|
Relational and Boolean
Operators
- When comparing two values, these return true when:
- = = The two values are equal.
- != The two values are not equal
- < The first value is less than the second.
- > The first value is greater than the second.
- >= The first value is greater than or eqaul to the second.
- <= The first value is less than or equal to the second.
- ! is a negation operator. If the boolean value is true, !
returns
false, and vice versa.
Comparing Multiple Statements
Constants
Advanced Topic: Ternary Operators
Advanced Topic: Bitwise Operators
Created by: Brandan
Jones January 4, 2002