Scala Traits and Abstract Classes

Scala traits are a great feature of the language. As I’ll show in the following lessons, you can use them just like a Java interface, and you can also use them like abstract classes that have real methods. Scala classes can also extend multiple interfaces.

Scala also has the concept of an abstract class, and I’ll show when you should use an abstract class instead of a trait.

results matching ""

    No results matching ""