日期:2014-05-20  浏览次数:20594 次

如何乱序排列文件内容
在java里,如何乱序排列文件内容?   文件可能比较大,有600万行,文件大约为80M左右
有没有比较好的算法,有一个思路也成.请指教.

------解决方案--------------------
什么是乱序排列?
------解决方案--------------------
Collections有
static void shuffle(List list)
Randomly permutes the specified list using a default source of randomness.
static void shuffle(List list, Random rnd)
Randomly permute the specified list using the specified source of randomness.

------解决方案--------------------
文件又不是list似乎问题没有ls说的这么简单吧