Advertisement

Scala demo with Tuple and Option and Pattern Matching and Exception

Scala demo with Tuple and Option and Pattern Matching and Exception The Tuple is good for returning multiple values without creating a class. The maximum number of values is currently 22. Which means that there is actually a type called Tuple22!
The option is a good way to avoid NullPointer-Exceptions.
The Pattern Matching is good for evaluating values.
The Exception handling is using pattern matching!
Enjoy! :-)
Feel free to comment or ask questions.
The code is located here:

Follow me on twitter:

scala,option,tuple,pattern matching,exception,exception handling,

Post a Comment

0 Comments