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 nil, null, none, and nothing in scala.

Answer Posted / Jasvant Singh

{"Nil": ["Nil is an empty list or empty sequence in Scala. It's a singleton object that extends the abstract class EmptyList."], "Null": ["Null is a reference value representing no object instance in Scala. In other words, it's used when there is no value at all."], "None": ["None is an instance of the Option type, which represents either a value or no value (i.e., absence of a value). It is used in functional programming to handle cases where a function may return no result."], "Nothing": ["Nothing is a subtype of all other types in Scala and represents the unreachable state of a program. It signals that something went wrong during execution."]}

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?

2


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

8