title: Unable to get random number to be generated every time object is created
body: <p>I am creating an object with the same parameters multiple times over and over again. The object has a random method (using Math.random()) in it which I know should return a different number every time, but each time within the program I create a new object of that class and call the method on it, it returns the same value. How should I fix this?</p>
  
  <p>place where I call the method contract:</p>
  
  <pre><code>for (int i = 0; i &lt; 212000; i++){
              Contractions c = new Contractions(a, b);
              temp = c.contract();
              if (temp &lt; min){
                  min = temp;
              }
              if (i%1000 == 0){
                  System.out.println(min);
              }
          }
  </code></pre>
  
  <p>method:</p>
  
  <pre><code>while (vertices.size() &gt; 2){
          Edge randEdge = edges.get((int) (Math.random()*edges.size()));
          vertices.remove(randEdge.getTwo());
          for (int i = edges.size() - 1; i &gt;= 0; i--){
              if (edges.get(i).getOne() == randEdge.getTwo()){
                  edges.get(i).setOne(randEdge.getOne());
              }
              if (edges.get(i).getTwo() == randEdge.getTwo()){
                  edges.get(i).setTwo(randEdge.getOne());
              }
          }
          edges.remove(randEdge);
          removeSelfLoops();
  
  return edges.size();
  </code></pre>
  
  <p>edge class:</p>
  
  <pre><code>package Contractions;
  
  public class Edge {
      Vertex one;
      Vertex two;
      public Edge(Vertex one, Vertex two){
          this.one = one;
          this.two = two;
      }
      public boolean isEqual(Edge other){
          if (other.one == this.one &amp;&amp; other.two == this.two){
              return true;
          }
          if (other.two == this.one &amp;&amp; other.one == this.two){
              return true;
          }
          return false;
      }
      public Vertex getOne(){
          return one;
      }
      public Vertex getTwo(){
          return two;
      }
      public void setOne (Vertex v){
          one = v;
      }
      public void setTwo (Vertex v){
          two = v;
      }
      public String toString(){
          return one + "; " + two;
      }
  }
  </code></pre>