Getting String Length : String « JSP « Java






Getting String Length

<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>

           
       








Related examples in the same category

1.String array
2.Creating a String