作者qrtt1 (null)
看板java
标题Re: [问题] File.list的排列方是
时间Wed Apr 21 10:59:51 2010
※ 引述《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