+ 1
What is the difference between attributes and local variables?
2 Réponses
+ 4
a local variable has scope only in the block of code in that is defined.
in the other Hand, an attibute is bind to a specific object, and can define the object's behavior. The object can interact in many modules, thank to the encapsutation property
+ 1
Attributes are local variables belonging to an object.