Piet Souris wrote:
Daniele Barell wrote:
The rest of the name for getters and setters is the name of the property encapsulated beginning whith capital letters:
So for example we have a property called numberOfExams the getter and setters must be called
getNumberOfExams() and setNumberOfExams;
Hope you'll make me clear.
No, it is the other way round!
Suppose you have this class:
then you have the property: familyName, and its value is: lastName. You may be forgiven to think tht the property is lastName, to be retreived by the getFamilyName method, but as said, it is just the other way around.
The Java Virtual Machine has a heap that is shared among all Java Virtual Machine threads. The heap is the run-time data area from which memory for all class instances and arrays is allocated.