How do I use POJO equivalents in Scala?

Viewed 12665

Suppose I have the following

class SimpleClass (myInt: Int, myString: String) {

}

What is wrong with the following?

val mySimple = new SimpleClass(1, "hi")
println(mySimple.myInt)
4 Answers
Related