object TupleTest { def basic(firstName: String, lastName: String, age: Int): (String, String, Int) = (firstName, lastName, age) def main(args: Array[String]) {
val member = basic("alex", "cao", 22)
println("Hello, my name is " + member._1 + " " + member._2 + ", and I am " + member._3 + " years old")
}
}
Scala元组可以组合不同类型数据, 目前支持的元素个数最多为22个