0
Sometimes I confuse properties with variables. How to avoid it?
1 Resposta
+ 1
A Property will use one or more variable to define it.
Ex: In the Person class, they have a Property of HairColor.
HairColor is defined as a String variable type that can accept a value.
Since HairColor can be set to "blonde" or "black" or "brown", etc. It is in effect a variable.
But in terms of a class it is called a property.
So, thinking of a property like a variable is a good start.