Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

String Array Length in Java

String Array is a commonly used data structure when programming in Java. Although we can generally use List for greater flexibility, but sometimes using String Array is more suitable for a given scenario. Arrays in general have the property of having fixed number of elements and the size can't be changed throughout the lifetime of the data structure. When given a String Array as parameter to our method, it is common that we wish to know the length of it. Below are some examples on how to get the length of a String Array in Java.



This post first appeared on Grails Cookbook, please read the originial post: here

Share the post

String Array Length in Java

×

Subscribe to Grails Cookbook

Get updates delivered right to your inbox!

Thank you for your subscription

×