Java Reference
In-Depth Information
7).toList()"));
out.println("The sum of : " + l + " is
: "
+
el.eval("list.stream().sum()"));
}
}
String concatenation operator ( += )
The += operator returns the concatenation of operands located on either side of the
operator. For example, 1 += 2 returns 12 while 1 + 2 returns 3. To welcome a new
connected student to our website we only need to locate the following expression
somewhere in a web page:
#{'Welcome' += studentBean.lastName} .
Assignment operator ( = )
The A = B expression assigns the value of B to A . To make this possible, A must be
a writable property. The assignment operator ( = ) can be used to change the value
of a property. For example, the #{studentBean.identity = '96312547' } ex-
pression assigns the value 96312547 to property studentBean.identity .
Note
The assignment operator returns a value and it is right-associative. The expres-
sion a = b = 8 * 3 is the same as a = (b = 8 * 3) .
Semi-colon operator ( ; )
The semi-colon operator can be used like the comma operator in C or C++. When
two expressions exp1 and exp2 are separated by a semi-colon operator, the first ex-
pression is evaluated before the second, and it is the result of the second expression
that is returned. The first expression may be an intermediate operation, such as in-
crementation, whose result will be used in the last expression.
Search WWH ::




Custom Search