scala 基礎知識

初識 array,list,set,map,元組 等 //定長數組 val arr1 = new Array[Int](10) //變長數組 val arr2 = new ArrayBuffer[Int]() //定長數組與變長數組的轉換 arr1.toBuffer arr2.toArray //元組進行循環遍歷的方法: val tuple1 = (1, 2, 3, "heiheihei")
相關文章
相關標籤/搜索