Adding value : Operator « JSP « Java






Adding value

<%--
  Copyright (c) 2002 by Phil Hanna
  All rights reserved.
  
  You may study, use, modify, and distribute this
  software for any purpose provided that this
  copyright notice appears in all copies.
  
  This software is provided without warranty
  either expressed or implied.
--%>
<%@ page session="false" %>
<%
   int value = 3;
%>
<p>The value is <%= value %></p>
<%
   value += 2;
%>
<p>After adding 2, the value is <%= value %></p>


           
       








Related examples in the same category

1.Checking Operator Precedence
2.Using Logical Operators
3.Using Relational Operators
4.Addition and Subtraction
5.Multiplication and Division
6.Incrementing and Decrementing
7.Using Operators