
上QQ阅读APP看书,第一时间看更新
Equality and relational operators
The equality Dart operators are as follows:
- ==: For checking whether operands are equal
- !=: For checking whether operands are different
For relational tests, the operators are as follows:
- >: For checking whether the left operand is greater than the right one
- <: For checking whether the left operand is less than the right one
- >=: For checking whether the left operand is greater than or equal to the right one
- <=: For checking whether the left operand is less than or equal to the right one
In Dart, unlike Java and many other languages, the == operator does not compare memory references but rather the content of the variable.