MVEL allows you assign variable in your expression, either for extraction from the runtime, or for use inside the expression.
As MVEL is a dynamically typed language, you do not have to specify a type in order to declare a new variable. However, you may optionally do so.
Unlike Java however, MVEL provides automatic type conversion (when possible) when assigning a value to a typed variable. For example:
For dynamically typed variables where you simply want to perform a type conversion, you may simply cast the value to the type you desire:
MVEL has an extensive (and pluggable) type conversion system. For more information, see: Type Conversion