如何在java中包含大于整数空间的列表 [英] How can I have a list in java with larger than integer space

查看:90
本文介绍了如何在java中包含大于整数空间的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在java中使用java.util.List来存储我的计算结果

I am using java.util.List in java for storing a results of my calculation

如何存储大于最大整数的索引的值? (例如大)

How can I store values for indexes bigger than maximum integer? (eg large)

推荐答案

简短的回答是,您将不会使用java.util.List接口。你将不得不实现其他的东西。

The short answer is, you will not be using the java.util.List interface. You will have to implement something else.

如果是我的程序,并且它不适合某些特定的超级计算环境,那么我会认真考虑使用数据库代替试图在RAM中存储超过20亿个对象。

If it was my program, and if it was not tailored for some specific supercomputing environment, then I would seriously consider using a database instead of trying to store more than two billion objects in RAM.

这篇关于如何在java中包含大于整数空间的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆