Explain the difference between a trait and an abstract class?
Answer / Rohit Agrawal
{"Traits": ["Traits in Scala are like interfaces + multiple inheritance. They can contain methods, variables, and other traits. A class adopting a trait inherits all members of that trait."], "Abstract Classes": ["An abstract class is a partially implemented class that cannot be instantiated directly. It contains both concrete (implemented) and abstract (unimplemented) methods. Unlike interfaces, it can contain variables as well."]}
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a closure?
What is string in scala?
what are the features of scala?
What is hashset in scala collection?
What is an anonymous object in scala?
What is a custom exception in scala?
Why scala is faster than java?
What is the difference between call-by-value and call-by-name function parameters?
What is the difference between 'val' and 'lazy val' in Scala? What is Eager Evaluation? What is Lazy Evaluation?
Like Hibernate for Java-based applications, What are the Popular ORM Frameworks available to use in Play/Scala based applications?
How do I append data in a list?
What is SBT? What is the best Build Tool to develop Play and Scala Applications?