A must-know for anyone heading into a Scala interview, this question is frequently asked in Scala coding interview questions.   In Scala, while declaring a class, sometimes we specify some parameters which are mandatory to pass while instantiating an object of that type. These parameters are called class parameters. As the body of the class plays the role of the primary constructor in Scala, these parameters actually define its arguments. If we declare the parameters with val or var, they become a member of the class. In the example below, id, name, and salary are the class parameters for the Employee class. Here, id and name are the members of the class, but the salary is not. class Employee(val id:Long, val name:String, salary:Int)