With fastutil 6, a new set of classes makes it possible to handle very
large collections: in particular, collections whose size exceeds 2^31.
Big arrays are arrays-of-arrays handled by a wealth of static methods
that act on them as if they were monodimensional arrays with 64-bit
indices, and big lists provide 64-bit list access.
# 1 楼答案
专门研究大型数据结构的FastUtil库有一个BigList类,其实现实际上使用数组数组。getter和setter使用
long
参数作为索引# 2 楼答案
简而言之,您将不会使用java。util。列表界面。你必须实施一些其他的东西
如果是我的程序,如果它不适合某个特定的超级计算环境,那么我会认真考虑使用数据库而不是试图在RAM中存储二十亿个以上的对象。p>