EL Arithmetic : EL « JSP « Java






EL Arithmetic


<html>
<body>
    <h1>EL Arithmetic</h1>
    <table border="1">

      <tr>
        <td><b>Concept</b></td>
        <td><b>EL Expression</b></td>
        <td><b>Result</b></td>
      </tr>    
      <tr>
        <td>Literal</td>
        <td>${'${'}10}</td>
        <td>${10}</td>
      </tr>    
      <tr>
        <td>Addition</td>
        <td>${'${'}10 + 10 }</td>
        <td>${10 + 10}</td>
      </tr>  
      <tr>
        <td>Subtraction</td>
        <td>${'${'}10 - 10 }</td>
        <td>${10 - 10}</td>
      </tr>    
      <tr>
        <td>Multiplication</td>
        <td>${'${'}10 * 10 }</td>
        <td>${10 * 10}</td>
      </tr>    
      <tr>
        <td>Division / </td>
        <td>${'${'}10 / 3 }</td>
        <td>${10 / 3}</td>
      </tr>    
      <tr>
        <td>Division DIV</td>
        <td>${'${'}10 div 3 }</td>
        <td>${10 div 3}</td>
      </tr>    
      <tr>
        <td>Modulus</td>
        <td>${'${'}10 % 10 }</td>
        <td>${10 % 3}</td>
      </tr>    
      <tr>
        <td>Modulus</td>
        <td>${'${'}10 mod 10 }</td>
        <td>${10 mod 3}</td>
      </tr>    
      <tr>
        <td>Division by Zero</td>
        <td>${'${'}10 / 0 }</td>
        <td>${10 / 0}</td>
      </tr>    
      <tr>
        <td>Exponential</td>
        <td>${'${'}2E2}</td>
        <td>${2E2}</td>
      </tr>  
      <tr>
        <td>Unary Minus</td>
        <td>${'${'}-10}</td>
        <td>${-10}</td>
      </tr>    
        
    </table>
    
    
  </body>

</html>



           
       








Related examples in the same category

1.EL and Complex JavaBeans
2.EL and Complex JavaBeans 1
3.JSP and EL: EL Expression Examples
4.JSP and EL: EL Type Conversion Examples
5.JSP and EL:EL Property Access and Nested Properties
6.JSP and EL: Implicit Object Example Form processorJSP and EL: Implicit Object Example Form processor
7.EL Function Examples