IMHO, String.length() has to be a function and not a public final variable because String is implemented by java code itself. So, it doesn't know the length of the string until it creates it, and thus it can't provide it as a final variable. On the other hand, arrays for primitive types are implemented via an external platform-dependent dll, which returns the specified object. Thus, java code will know the length of an array when it gets it back from the dll, and thus can provide a public final property for the same.
the string.length() is a function which calculates the length of the string.
If you take a look at the implementation, it just returns the value of the private "count" field. The count field is only assigned in constructors.
BUT - for the count field to be public, it would have been vital to also make it final. That's no problem for arrays, which can only be constructed in very specific ways. For String it might constrain the class' design too much to be a good idea.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus