Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
VB.NET
Perl
COBOL
Pascal
FORTRAN
BASIC
Ada
C++
Scala
ASP.NET
 C
 :) Hot Jobs
 
 :) Latest Articles


  

 


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

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



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


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?






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |