How to create POJO class with only empty constructor in Scala?
问题 I want to create POJO class in Scala with only default empty constructor. In java, it's like this: public class Foo { private String name; private String address; ... //and the public getter/setter below... } In scala, I have seen that you can create POJO like this: case class Foo(var name: String, var address: String, ...) But in my case, the class will have many properties (around 50+), and I don't think instantiating the class with 50 constructor parameters is fit for this case. UPDATE: