Difference between the length method invoked in string and array ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mohamed_Ibrahim
Posted On:   Tuesday, February 19, 2002 07:45 PM



While invoking length method in a String
the method is invoked as follows


String string = mohamedIbrahim;

int strlength = string. length() ;


While invoking length method in a Array
the method is invoked as follows


Array declaration...

array. length;



Re: Difference between the length method invoked in string and array ?

Posted By:   Dave_McDonnell  
Posted On:   Tuesday, February 19, 2002 08:23 PM

length is actually a public variable of an array rather than a method.



I guess this is for performance reasons but don't quote me on that one.

About | Sitemap | Contact