scala中的case class是一种特殊的对象:由编译器(compiler)自动生成字段的getter和setter.如下面的例子: case class City(name:String, province: String) case class Address(street: String, zip: String, city: City) case class Person(name: String, age: Int, phone: String, address: Address)…