Write the difference between length and length ( ) functions.
Answers
Answered by
10
Hey frnd. ...
length() is a method of aString class and which returns the number of characters in the string. .length will give the number of elements stored in an array. ... Array.length is a property of that Array , similar to a variable reference. ArrayList.size() is an actual method call to the array list object...
hope it helps u
length() is a method of aString class and which returns the number of characters in the string. .length will give the number of elements stored in an array. ... Array.length is a property of that Array , similar to a variable reference. ArrayList.size() is an actual method call to the array list object...
hope it helps u
aahanaraø:
thnks
Answered by
8
Answer:
length property is used with an array to get the number of elements of array
whereas length() method is used with String to get the length of the stored string.
Hope it helps......
Similar questions