How does a symbol differ from a string?
Answer / Yati Bajpai
In Ruby, symbols are objects that represent immutable strings with a colon at the end (e.g., `:symbol`). Symbols have the same value as their corresponding strings but provide better performance when used as keys in hashes or for method names because they are cached internally.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain while loop in ruby.
Explain Ruby if-else statement?
Explain the use of retry statement in ruby?
Explain about the defined operator?
Explain for loop in Ruby?
What is concatenating string in Ruby?
Explain ruby data types.
What is a struct in ruby?
Define ruby methods.
what is the purpose of the rakefile available in the demo directory in ruby?
what is a class library in Ruby?
Describe the environment variables present in Ruby?