scla-基础-函数-元组(0)
//元组 class Demo2 extends TestCase { def test_create_^^(){ val yuana = (1,true,1.2,"c","phone") val v1 = yuana._1 val v2 = yuana _2 ; val y1 = test_return_yuanzu() val k1 = y1._1 println(test_return_yuanzu3(3, 4, 4)) test_return_yuanzu4(ma) test_return_yuanzu4((K:Int,y:Double,c:String)=>{ println("scala 匿名函数 玩的不是一条道啊") println("java是怎么搞定它的") println("关键是如何在java中配合scla开发了") println("scala太自由了") }) } def test_return_yuanzu():(Int,Int)={ (10,10) } def test_return_yuanzu2():(Int,String,String) = (1,"2","2") def test_return_yuanzu3(x:Int,y:Int,c:Int):(Int,String,String) = (x+y+c,"2","2") def test_return_yuanzu4(ma:(Int,Double,String)=>Unit){ma(1,2,"")} def ma(x:Int,y:Double,k:String){ println(x+y+k) } }