object Demo { def main(args : Array[String]) { // create tuple var a = ("Lin", 39) var b = Tuple2("Lin", 39) // access tuple println(a._1+" "+a._2) // swap println(a.swap) // 39, Lin } }