I want to know how to input/output a large number file

Asked 2 years ago, Updated 2 years ago, 40 views

We're going to practice creating more than 100,000 random natural numbers with 232 in java I don't think it's possible with a scanner. It's not working. I'm trying to create it, save it, load it, and sort it out I don't know how to use it.

32

I'm going to make random and long ones, too It doesn't work well because it's mixed with negative numbers Please help me with what I should write

java

2022-09-22 13:58

1 Answers

Java uses the BigDecimal class.

There is a source that implements random with BigDecimal

http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/generic/dist/javadoc/uk/ac/leeds/ccg/andyt/generic/math/Generic_BigInteger.html#getRandom(java.math.BigInteger)


2022-09-22 13:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.