//PS:58 scala> //Tuple2 : Way 1 scala> val t1 = ("String", 1) t1: (String, Int) = (String,1) scala> //Tuple2 : Way 2 scala> val t2 = Tuple2("String", 1) t2: (String, Int) = (String,1) scala> //Tuple2 : Way 3 scala> val t3 = "String" -> 1 t3: (String, Int) = (String,1) scala> scala> //Tuple3 : Way1 scala> val t1 = ("String", 1, 2.3) t1: (String, Int, Double) = (String,1,2.3) scala> //Tuple3 : Way2 scala> val t2 = Tuple3("String", 1, 2.3) t2: (String, Int, Double) = (String,1,2.3)
No comments:
Post a Comment