Skip to content

Null

  • Null is a placeholder value to represent "nothingness".

Warning

Arithmetic does not apply to Null. Cannot use Null with Number or String.


Logical operators

Operator Description
! Not
== Equal to
!= Not equal to
and And
or Or

Info

  • Logical operators are similar to that of Boolean.
  • However, and and or will always return Null.

Warning

  • Ordered comparisons such as > or < do not work for Null.

Example

1
2
3
4
5
println null == null;   // true
println null != null;   // false
println null and null;  // null
println null or null ;  // null
println null == false;  // Error because Null cannot be compared with Boolean