Get random integer in range (x, y]? [duplicate] May 20, 2023 by Tarik Random generator = new Random(); int i = generator.nextInt(10) + 1;