Re: [問題] File.list的排列方是
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):