crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

Define the main differences between nil and false in Ruby?
Question Posted on 15 Mar 2021Home >> Programming Languages >> Ruby >> Define the main differences between nil and false in Ruby?

Define the main differences between nil and false in Ruby?
Below are the four main difference between nil and and false:-
(1)nil:-Here in ruby nil cannot be a value.
(1)false:-Here in ruby false can be treated as value.

(2)nil:-nil is not a boolean data type
(2)false:-false is a boolean data type.

(3)nil:-In ruby nil is an object of nilclass.
(3)false:-In ruby false is an object of falseclass.

(4)nil:-nil is returned where there is no predicate.
(4)false:-when there is case of predicate value of true or false is returned by a method.
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Why Ruby is said as flexible language

How can we create a Ruby Object?

What do you mean by redo statement in Ruby?

Define the main differences between nil and false in Ruby?






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap