Explain the difference in scope for these two variables: @@name and @name?
Answer Posted / Madan Lal
@@name is a class variable, which means it is shared among all instances of a class. It has a global scope within that class and its subclasses. @name, on the other hand, is an instance variable, which means it is unique to each individual object created from the class. Each object will have its own @name variable.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers