Java 教程
Java 實例
以下實例演示了如何使用 Collection 和 Listiterator 類的 listIterator() 和 collection.reverse() 方法來反轉集合中的元素:
以上代碼運行輸出結果為:
反轉前 A B C D E 反轉后 E D C B A