Question
What is a trait in Scala?
Select an option. Your answer will be checked instantly.
Correct Answer: A. A reusable abstraction containing method and field definitions
Explanation:
Classes can extend multiple traits.
Traits support interfaces and shared implementation.
Leave a Reply