Getting String Length : String « JSP « Java Tutorial






<HTML>
  <HEAD>
    <TITLE>Getting String Length</TITLE>
  </HEAD>

  <BODY>
    <H1>Getting String Length</H1>
    <%
        String s1 = "Hello from JSP!";

        out.println("\"" + s1 + "\"" + " is " + s1.length()
            + " characters long.");
     %>
  </BODY>
</HTML>








23.4.String
23.4.1.Creating a String
23.4.2.Getting String Length
23.4.3.Use for loop to display string array