元组是不可变类型
scala> val pair=(99,"erewe",List(1,2))
pair: (Int, String, List[Int]) = (99,erewe,List(1, 2))scala> pair._1
res7: Int = 99
scala> pair._2
res8: String = erewe
scala> pair._3
res9: List[Int] = List(1, 2)
元组是不可变类型
scala> val pair=(99,"erewe",List(1,2))
pair: (Int, String, List[Int]) = (99,erewe,List(1, 2))res9: List[Int] = List(1, 2)