title: java yahtzee game check for full house
body: <p>i am making java yahtzee game and I was just wondering if the following code would produce a false positive in any case</p>
  
  <p>die is an array containing pseudo-random(Math.random()) numbers for each die and i have sorted them using a bubble sort
  ex:
  if randomly thrown die where {1,2,1,2,1) they would then be sorted to {1,1,1,2,2} before being checked by the following code which is inside a method that returns a boolean value.</p>
  
  <pre><code>int count = 0;
  if(die[0] == die[1] &amp;&amp; die[1] == die[2] || die[0] == die[1] &amp;&amp; die[2] != die[1]){
      count++;
  }
      if(die[3] == die[4]){
          count++;
      }
      if(count &gt; 1){
          return true;
      }
      return false;
  </code></pre>