I know that for example '5'
is literal of type char
but is 5 * 5
a literal? This is expression, however it has fixed value.
Any literal is an expression, but not every expression is a literal (e.g. x+2 is an expression, where x is a variable, but not a literal. 123 is an integer literal, and also an expression (a very simple one).
A Literal Expression is the simplest form of DMN expression; it is commonly defined as a single-line statement, or an if-else conditional block. The Literal Expression is a type of value expression used in both Decision elements and Business Knowledge Model (BKM) elements.
Literal language is used to mean exactly what is written. For example: “It was raining a lot, so I rode the bus.” In this example of literal language, the writer means to explain exactly what is written: that he or she chose to ride the bus because of the heavy rain.
As described in Java Language Specification §15.28, it's a particular case of expression called "compile-time constant expression". It's not a literal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With