A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
how to find String array length
Joined: Jan 27, 2011
Feb 16, 2011 05:25:21
i am facing one problem i.e finding
my program is :
when i am printing arr.length it is giving 2.but i want 8 and 8.
Joined: Sep 08, 2007
Feb 16, 2011 05:34:49
Did you try- arr.length() and arr.length()?
arr is an array of Strings and you want the length of the Strings and not the length of the array.
Mohamed Sanaulla |
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: how to find String array length
Fixed-length numbers and strings
questions from java prepare
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015