case class

Simple Guidance For You In Case Class And Pattern Matching

Reading Time: 2 minutes Case classes are like regular classes that have default apply() method which handle object construction. There is no  need to use a new keyword to create an object. Case class provides purely functional code with immutable objects. Case classes are a representation of a data structure with the necessary methods. It support pattern matching. Syntax of case class:- Example:-  When you create a case class Continue Reading

Scala Beginner Series (2) : Object Oriented Scala

Reading Time: 7 minutes This series is all about the taste of Scala.It is best suitable for all the newbies in Scala. You may also like: Scala Beginner Series (1) : Basics In the previous part, we covered: Values, variables, expressions and types Functions and recursion The Unit type This article will cover the object oriented nature of Scala language. Classes Scala has the same concept of a class as we Continue Reading