Follow Kontext on LinkedIn. More from Kontext Raymond. Install Spark 2. By using this site, you acknowledge that you have read and understand our Cookie policy , Privacy policy and Terms.
About Cookie Privacy Terms Contact us. NET Java Programming. Subscription Subscribe to Kontext newsletter to get updates about data analytics, programming and cloud related articles.
We can also use the above method defined with some. These are good way to deal with the object they can always be used with option class in scala.
Either it will return instance of None or return an instance of some while working with it. Provide us many methods to work with the collection object as well. This is a guide to Scala Some. Here we also discuss the definition and how does some class work in scala?
You may also have a look at the following articles to learn more —. Submit Next Question. By signing up, you agree to our Terms of Use and Privacy Policy. Forgot Password? This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy. Scala Some By Shalu Sharma. Nothing: Nothing is also a Trait, which has no instances. It is a subset of each of the distinct types. The major motive of this Trait is to supply a return type for the methods which consistently throws an exception i.
It is also helpful in providing a type for Nil. Unit: The Unit is Scala is analogous to the void in Java, which is utilized as a return type of a functions that is used with a function when the stated function does not returns anything. Skip to content. Change Language. Related Articles. Table of Contents. Improve Article. Save Article.
0コメント