Ruby Developer Question:
Download Job Interview Questions and Answers PDF
What is the difference in scope for these two variables: @@name and @name?
Answer:
The difference in scope for these two variables is that:
☛ @@name is a class variable
☛ @name is an instance variable
☛ @@name is a class variable
☛ @name is an instance variable
Download Ruby Developer Interview Questions And Answers
PDF
Previous Question | Next Question |
Do you know what is the defined operator? | Tell me how would you freeze an object in Ruby? Can you provide a simple example? |