Tuesday, May 17, 2011

Getting Size of an array in java

To find the number of elements of an array, use array.length. For example,
for (int i = 0; i < a.length; i++)
System.out.println(a[i]);

No comments:

Post a Comment

Chitika