Java Tutorial/JSTL/Operators

Материал из Java эксперт
Версия от 18:23, 31 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Arithmetic Operator DIV

   <source lang="java">

<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %> <html> <head> <title>EL Expression Examples</title> </head> <body>

EL Expression Examples

Arithmetic Operators in Expressions

<c:out value="${2003 div 8}" />

</body> </html></source>





Arithmetic Operator Divide

   <source lang="java">

<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %> <html> <head> <title>EL Expression Examples</title> </head> <body>

EL Expression Examples

Arithmetic Operators in Expressions

<c:out value="${23/54}" />

</body> </html></source>





Arithmetic Operator Mod

   <source lang="java">

<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %> <html> <head> <title>EL Expression Examples</title> </head> <body>

EL Expression Examples

Arithmetic Operators in Expressions

<c:out value="${2003 mod 8}" />



<c:out value="${2003 % 8}" /> </body> </html></source>





JSTL Comparison Operator

   <source lang="java">

<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %> <%@ taglib prefix="fmt" uri="http://java.sun.ru/jstl/fmt" %> <html> <head> <title>EL Expression Examples</title> </head> <body>

EL Expression Examples

Logical Operators

Comparison Operators

4 > "3" <c:out value="${4 > "3"}"/>
"4" > 3 <c:out value="${"4" > 3}"/>
"4" > "3" <c:out value="${"4" > "3"}"/>
4 >= 3 <c:out value="${4 >= 3}"/>
4 <= 3 <c:out value="${4 < 3}"/>
4 == "4" <c:out value="${4 == 4}"/>

</body> </html></source>