How can I generate a random number without use of Math.Random?
问题 My project entails that I create a basic number guessing game that uses the JOptionPane and does not use Math.Random to create the random value. How would you go about doing this? I've completed everything except the random number generator. Thanks! 回答1: Here the code for a Simple random generator: public class SimpleRandom { /** * Test code */ public static void main(String[] args) { SimpleRandom rand = new SimpleRandom(10); for (int i = 0; i < 25; i++) { System.out.println(rand.nextInt());