看板 java 關於我們 聯絡資訊
※ 引述《master0101 (master)》之銘言: : File path = new File(./a/); : String[] list = path.list(); : 這兩行程式碼是要把 a 資料夾裡所有檔案的檔名存到list這個字串陣列 : 想請問這個陣列的順序 : 是依照甚麼去排的呢? : 先謝謝大家了~ http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#list() There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.165.131