Here’s the translation of the random numbers example from Go to Java, formatted in Markdown suitable for Hugo:
Our java.util.Random class provides pseudorandom number generation.
Some of the generated numbers may be different when you run the sample.
See the java.util.Random class documentation for references on other random quantities that Java can provide.
Note that Java’s Random class uses a different algorithm than Go’s math/rand/v2 package, so the exact numbers generated will be different. Also, Java doesn’t have a direct equivalent to Go’s PCG (Permuted Congruential Generator), but the basic concept of seeded random number generation is similar.
For more advanced random number generation needs, Java also provides the SecureRandom class, which is designed for use in cryptographic applications.