Scala / Scala interview questions
What is trait in Scala?
Traits are used to share interfaces and fields between classes. They are similar to Java 8's interfaces. Classes and objects can extend traits but traits cannot be instantiated and therefore have no parameters.
Traits are types containing certain fields and methods. Even multiple traits can be combined.
More Related questions...