This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes length Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "length" Watch "length" New topic
Author

length

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
dear all
Is array have .length()or length method ?
please comment.
thanks in advance.
--shi
deekasha gunwant
Ranch Hand

Joined: May 06, 2000
Posts: 396
Hi shi,
Arrays have a field named length (not a method). so to get an array's length use
arayneme.length
regards
deekasha
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: length
 
Similar Threads
Returning lenght of a string
String.length() returns strange results
what is wrong with my validation code ?
What is Database Length?
if Statements the best?