Computer Science, asked by 6Shivam92, 1 year ago

Write the difference between length and length ( ) functions.

Answers

Answered by aahanaraø
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

aahanaraø: thnks
wandana22: lol
wandana22: ..
aahanaraø: why lol
aahanaraø: ???
Answered by sabari0730
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