title: how to create a java function that makes random math problems.
body: <p>I am trying to create a Java function that creates random math problems. I want to have this function create the problem then onclick show the answer.</p>
  
  <p>Is is necessary to use <code>Random int</code> ?</p>
  
  <p>I was thinking something like this making <code>i</code> a random number then using it in math problems... any help is appreciated.</p>
  
  <pre><code>private int rando(int i) {
      Random randomGenerator = new Random();
      int randomInt = randomGenerator.nextInt();
      i = randomInt;
      return rando();
  }
  
  public static int add(int i, int i)
  {
      int a = i+i;
      return a;
  }
  
  b1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e){
          String b = "Click For Answer";
          b1.setText(b.toString());
  
          jl.setText(prob.toString());
      }
  });
  </code></pre>