Java/JSP/Variables

Материал из Java эксперт
Перейти к: навигация, поиск

Creating a Variable

<HTML>
  <HEAD>
    <TITLE>Creating a Variable</TITLE>
  </HEAD>
  <BODY>
    <H1>Creating a Variable</H1>
    <%
        int days;
        days = 365;
        out.println("Number of days = " + days);
     %>
  </BODY>
</HTML>





Using a Literal

<HTML>
  <HEAD>
    <TITLE>Using a Literal</TITLE>
  </HEAD>
  <BODY>
    <H1>Using a Literal</H1>
    <%
        out.println("Number of days = ");
        out.println(365);
     %>
  </BODY>
</HTML>