Similar to interfaces in Java, traits are used to define object types by specifying the signature of the supported methods. Like in Java 8, Scala allows traits to be partially implemented; i. e. it is possible to define default implementations for some methods. In contrast to classes, traits may not have constructor parameters.
0
0
Related videos
Preparing
To view the site materials you should be more than or equal to 18 years old