Add objects from case class in Scala


#1

So, I am new to programming and this might be a very rookie question. I need to add elements to an object. How is this done?

scala>    case class test (
                               a: String,
                               b: String,
                               c: Int,
                               d: Int
                             )





        var teamData_Temp = test(lol, lel,1, 2)

        var teamData_All = teamData_Temp

Then let’s say that teamData_Temp becomes teamData_temp = test(kok,kek,3,4) at some point in the script

How do I produce teamData_All = (test(lol,lel,1,2),test(kok,kek,3,4)) ???


#2

I see you’ve gotten help with this at https://stackoverflow.com/questions/47695072/expression-of-type-listobject-doesnt-conform-to-expected-list-scala