Using a long as ArrayList index in java

后端 未结 7 1524
遇见更好的自我
遇见更好的自我 2020-12-10 14:01

I am writing this java program to find all the prime numbers up to num using the Sieve of Eratosthenes, but when I try to compile, it says I can\'t use a long var as an arra

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 15:02

    the jScience Library has a large vector called Float64Vector. While I have never used this Class it might fit your needs. No promises.

    EDIT: Zach Scrivena pointed out in the comments that the Float64Vector is dimensioned to ints. I stand corrected.

提交回复
热议问题