Welcome to the Scala tutorial. We will cover the Scala in two-part blog series. In this part, we will learn the following topics
- Scala Features
- Variables and Methods
- Condition and Loops
- Variables and Type Inference
- Classes and Objects
For better understanding, do hands-on with this tutorial. We’ve made this post in such a way that the reader will find easy to follow the tutorial with hands-on.
Scala Features
Scala is a modern multi-paradigm programming language designed to express common programming patterns in a concise, elegant, and type-safe way.
It is a statically typed language. Which means it does type checking at compile-time as opposed to run-time. Let me give you an example to better understand this concept.
When we deploy jobs which will run for hours in production, we do not want to discover midway that the code has unexpected runtime errors. With Scala, you can be sure that your code will not give you unexpected errors while running in production.
Since Scala is statically typed we get performance and speed over dynamic languages.
How is Scala different than Java?
Unlike Java, in Scala, we do not have to write quite as much code to perform simple tasks and its syntax is very similar to other data-centric languages. You could say that Scala is the modified version of Java with less boilerplate code.