Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How symbol is different from variables?



How symbol is different from variables?..

Answer / Shashi Kumar

Symbols in Ruby are objects that represent unique identifiers for method names, attribute names, and constant names. Unlike variables, they are immutable and have a faster lookup time because they are cached by the interpreter. They are defined using colons like :symbol_name. Variables, on the other hand, are declared using variables names such as variable_name and can hold any value.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Explain case statement in Ruby?

1 Answers  


Explain the role of thread pooling in relation to the thread lifecycle in ruby?

1 Answers  


What must you do first before you can invoke an unboundmethod object?

1 Answers  


Explain about Class variable and global variable?

1 Answers  


What is concatenating string in ruby. In how many ways you can create a concatenating string.

1 Answers  


Explain Ruby exceptions?

1 Answers  


How would you freeze an object in ruby? Can you provide a simple example?

1 Answers  


What is the difference between “#==” and “#equal?”

1 Answers  


What are class libraries in Ruby?

1 Answers  


What are advantages of using ruby?

1 Answers  


Explain about the command line options?

1 Answers  


Explain the concepts and capabilities of garbage collection feature of Ruby?

1 Answers  


Categories