Explain how Symbol is different from variables?
Answer / Ranveer Kumar Singh
In Ruby, Symbols are immutable objects with unique identities, while variables are mutable references to objects. Symbols can be used as keys in hashes and method names, whereas variables are used for storing values.
| Is This Answer Correct ? | 0 Yes | 0 No |
How is class methods defined in ruby?
mention what is the difference between a single quote and double quote?
What are the key features of ruby?
Tell me what is the difference between calling super and calling super()?
How ruby looks up a method to invoke?
What is the difference between ruby 1.9 and ruby 2.0?
What is Ruby programming language?
Explain about portability?
How is an iterator handled in ruby?
Name some operators used in ruby.
Tell me what is the role of sub-directory app/controllers and app/helpers?
Define ruby methods.