Traits in Scala

One of the new features in Scala is a trait, which is very similar to the notion of an interface in Java, except that it can also contain concrete methods. Although, Java 8 already has support for this. On the other hand, traits are one of the new concepts in Scala. But the feature already exists in OOP. So, they look like abstract classes, except that they don't have constructors.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.53.26