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

Differentiate between null, nil, none and nothing?

Answer Posted / Rina Kumari

In Scala:nn- null: It is used for a reference to an object that has not been initialized.n- nil: It is used specifically with Option type to represent the absence of a value (similar to None).n- none: It is an instance of the Option[A] class which wraps a value of type A and provides methods for handling the absence of a value (similar to None but it can be used as a pattern matching option).n- nothing: It represents a type in Scala's Type Level Programming, denoting that there is no value of a given type.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest version of scala?

1


What is the current latest version of scala? What is the major change or update in scala 2.12?

7