Difference – 1
class Employee(x: Int, y: Int) {}
trait Learning (x: Int, y: Int) {} // Does not compile
Difference – 2
In classes – super calls are statically bound, in traits, they are dynamically bound. If
you write “super.toString” in a class, you know exactly which method
implementation will be invoked.
In Trait – When you write the same thing in a trait, the method implementation to invoke for the super call is undefined when you define the trait. Rather, the implementation to invoke will be determined anew each time the trait is mixed into a concrete class. This
allows traits to work as stackable modifications!!