Random random = new Random(); int rand = random.nextInt();. Yes, it's that simple to generate a random integer in java. When we create the Random instance, it ...
確定! 回上一頁