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...


Explain the difference between nil and false in ruby?



Explain the difference between nil and false in ruby?..

Answer / Nitin Kumar Verma

In Ruby, 'nil' is an object that represents the absence of any value or object, while 'false' is a boolean value representing falsehood. While 'nil' evaluates to false in boolean contexts, it takes up memory space. On the other hand, 'false' does not consume memory and is preferred for boolean values.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

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

1 Answers  


Tell me how you define instance variable, global variable and class variable in ruby?

1 Answers  


How to access Ruby array elements? How many methods are used to access Ruby elements?

1 Answers  


What are Ruby iterators?

1 Answers  


Do you know when self.up and self.down method is used?

1 Answers  


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

1 Answers  


What are the object-oriented programming features supported by ruby?

1 Answers  


Tell me an array [1,2,34,5,6,7,8,9], product it using a method?

1 Answers  


What is ruby class?

1 Answers  


Why Ruby is known as a language of flexibility?

1 Answers  


Please explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?

1 Answers  


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

1 Answers  


Categories