What are the expression language operators?

Expression language has support for arithmetic, logical and relational operators.

Adition: +
Substraction: -
Multiplication: *
Division: / or div
Reminder:% or mod
Note: if you divide zero in EL you will get INFINITY not an error.
You can you reminder operator against a zero, you will get exception.

And: && or ‘and’
Or: || or ‘or’
Not: ! or ‘not’

Equals: == or ‘eq’
Not equals: != or ‘ne’
Less than: < or ‘lt’
Greater than: > or ‘gt’
Less than or equals to: <= or ‘le’
Greater than or equals to: >= or ‘ge’

-Do not use EL reserved words as identifier. Also do not use the words true, false, null, ibstanceof, empty.
-There is no = operator in EL.
-In arithmetic EL treats null values as zero.
-In logical expression EL treats the null values as false.

No comments:

Post a Comment