There are the arithmetic operators here: '+', '-', '*', '/', '%'. You can also use the following for the '/' (division) and '%' (remainder or modulo) operators: div and mod. You can see examples of these being used below:
6 + 7 = ${6+7}<br> 8 x 9 = ${8*9}<br>
The relational operators are shown below:
Here are some basic comparisons:
Is 1 less than 2? ${1<2} <br> Does 5 equal 5? ${5==5} <br> Is 6 greater than 7? ${6 gt 7}<br>
The logical operators are the same as the Java Programming Language, but they also have their textual equivalents within the EL.
The empty operator allows you to test the following:
Object references to see if they are null.
Strings to see if they are empty.
Arrays to see if they are empty.
Lists to see if they are empty.
Maps to see if they are empty.
You use the operator in the following way:
empty variableNameIf any of the above conditions are met, then the operator returns true.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |