Scala Trait and Mixin – Points to Remember
Reading Time: 3 minutes Scala Trait and Mixin – Points to Remember Trait can be viewed not only as interfaces in other languages, but also as classes with only parameterless constructor. Whenever there is some code in trait, the trait is called mixin. trait Alarm { def trigger(): String } In scala trait, If we create simple class and pass parameter in constructor, without any val or var, it Continue Reading