scala

Scala Traits in Simple words

Reading Time: 2 minutes In this blog post, we will talk about traits in Scala. Then we will discuss how is a trait different from abstract classes. Scala Traits A trait is similar to a partial implementation of an interface. A trait in Scala can contain abstract and non-abstract methods. We can make a trait with all abstract methods or some abstract methods and some non-abstract methods. Variables declared Continue Reading

What are Case Classes in Scala

Reading Time: 2 minutes Case Classes in Scala Case classes in scala are regular classes with some extra toppings. Let’s discuss why they are high in demand. A case class with no arguments is declared as a case object rather than a case class. By default, the case object can be serialized. A Case Object is also like an object, which has more attributes than a regular Object and Case classes Continue Reading