Home Jsp JSP Array Length

Related Tutorials


 
 

Share on Google+Share on Google+

JSP Array Length

Advertisement
JSP Array Length is performed when you want to compute the length of array in JSP.

JSP Array Length

        

JSP Array Length is performed when you want to compute the length of array in JSP.

Understand with Example

The Tutorial illustrate an example from 'JSP Array Length'. To understand and grasp this example we create a page directive that include the language type is Java. You can see in the example that we create a Scriptlets that include an array of integer. To print the size of array we  use out.print in JSP.

array.length( )  : This method is used to display the length of array.

Here is the code of jspArrayLength.jsp

<%@ page language="java"%>
<html>
<%
int array[]={2,4,6,8,10};
out.print("Size of Array is: "+array.length);
%>
</html>

Output will be displayed as:

Download Source Code:

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 15, 2009

Related Tutorials

Discuss: JSP Array Length  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com