I see that length of an array is a keyword in java and that String has a method length().
How can a keyword return a numeric value, when it is not explicitly declared to do so?
array has a public final int field length for array class
from jls-10.3
The public final field length, which contains the number of components of the array (length may be positive or zero).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With