Why is length a data field in when we talk about arrays and length() when we talk about String in Java? Means:
int a[10] = {1,2,3,4,5,6,7,8,9,10};
String str = "foo";
int a_len = a.length;
int str_len = str.length();
Why is length not a function in case of arrays or vice versa?