如果想要陣列從尾端開始,則遍歷的寫法為: (0 until (arrayBuffer.length, 2)).reverse. Scala也提供了一個和Java增強for迴圈類似的for
確定! 回上一頁