I understand that this question is similar to others asking about Java Properties, and the answers in those questions seem to be "no, you have to use getters/setters".
I searched for C#-like Java properties, but have only found one "hit" so far. And I'm not sure if it is a property or something else.
Reading the Java Tutorial, I came across some text and code that says (** emphasis and comment mine):
Finally, you can use the built-in **length property** to determine the
size of any array. The code:
//notice lack of brackets after anArray.length :
System.out.println(anArray.length);
will print the array's size to standard output.
Since Array
has a length
property, Java does have properties, right?
Can someone point to some documentation about them?