September 2018
Intermediate to advanced
398 pages
9h 43m
English
Here we are! Let's create our first application. First, create the entry point for the program. If you are coming from Java, it would be equivalent to defining the public static void main(String[] args).
Right-click on the src/main/scala folder and select New | Scala Class. Give Main as the class name and Object as the Kind:

We have created our first object. This object is a singleton. There can be only one instance of it in the JVM. The equivalent in Java would be a static class with static methods.
We would like to use it as the main entry point of our program. Scala provides a convenient class named App that needs ...
Read now
Unlock full access