You will be surprised to know that you can also create Scala script and execute it on Windows OS(as a bat script) as well as on Linux/Unix OS(as a shell script) without any compilation.
Scala Exception handling is mostly very similar with Java exception handling except catch block syntax. Here I am just trying you to explain Scala exception handling concept in brief as it is a very vast topic in itself.
I am sure that if you have come across Java programming language, you might have used switch case statements in Java. Scala pattern matching expression is quite similar with Java switch-case statements, and provides far more features than that.
While programming in Java(earlier versions the Java 8), majority of us have come across a situation here we get
NullPointerException. It happens because many times we write a code without checking all possibilities and method returns null value under certain conditions.
Same as Java Map, Scala Map is the collection(Iterable) of various key and value pairs in Scala Collections. All keys in Map are unique and associated with a value. Same as List and Set, Scala Maps are also having two types immutable and mutable.