Lesson_caseClass
package com.bjsxt.scala case class Person2(var name:String,age:Int) object Lesson_caseClass { def main(args: Array[String]): Unit = { val p1 = Person2("zhangsan",18) val p2 = new Person2("zhangsan",18) println(p1.equals(p2)) } }
package com.bjsxt.scala case class Person2(var name:String,age:Int) object Lesson_caseClass { def main(args: Array[String]): Unit = { val p1 = Person2("zhangsan",18) val p2 = new Person2("zhangsan",18) println(p1.equals(p2)) } }