版权声明:本文为博主原创文章,转载联系 [email protected] https://blog.csdn.net/qq_31573519/article/details/82793996
不BB直接上代码:
object Test {
def main(args: Array[String]): Unit = {
val a = ("a", 1, 9.9)
var rs = ""
a.productIterator.foreach(v=> rs = rs + v.toString+"\t")
println(rs)
}
}
RS:
a 1 9.9