Java Reference
In-Depth Information
Figure 3-3.
Relational operators
Logical Operators
Listing 3-8 illustrates the logical operators like
&&
,
||
, and the
not
operator in action. You can use this
code on a JSP file and run it on the server. The output is illustrated in Figure
3-4
.
Listing 3-8. Logical Operators
<table border="1">
<tr>
<td><b>Logical Operator</b></td>
<td><b>Result</b></td>
</tr>
<tr>
<td>${'${'}true && false}</td>
<td>${true && false}</td>
</tr>
<tr>
<td>${'${'}true || false}</td>
<td>${true || false}</td>
</tr>
<tr>
<td>${'${'}not true}</td>
<td>${not true}</td>
</tr>
</table>

