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))
  }
}

  

posted @ 2018-07-07 20:06  uuhh  阅读(148)  评论(0编辑  收藏  举报