2 つの乱数を使用する単純な数学ゲームを作成し、ユーザーが次の各操作 (加算、減算、乗算、べき乗) の答えを入力できるようにしたいと考えています。乱数を定数として設定できる最大値の定数を設定する方法がわかりません。
import java.util.Random;
import java.util.Scanner;
public class Program1 {
public static void main(String[] args) {
Random generator = new Random();
// create a variable that will hold the first random number
int random1 = generator.nextInt();
// create a variable that will hold the second random number
int random2 = generator.nextInt();
// create a constant for the maximum the random number can be