+ 2
What is the difference between length and length()
2 Respuestas
+ 8
length is a property while length() is a method.
For classes that have some mention of a length, some have it as a property while some have it as a function that returns the actual length.
0
eg
int[] array = {1,2,3,4,5};
int len = array.length;
int len2 = "some string".length();