title: Check if all values in an array are not equal (java)
body: <p>For my code I would like to check an array which will be filled many times with 6 random integers.
  Each time I want to check if all 6 values are different and if this happens for the code to stop.
  However after trying to use loops I was having problems so I just used a long ass If statement to check each location in the array with each other location. However This is not working. Would love if someone could tell me why i'm being stupid.</p>
  
  <pre><code>if((diceArray[0] != diceArray[1] &amp; diceArray[0]!=diceArray[2] &amp; diceArray[0]!=diceArray[3] &amp; diceArray[0]!=diceArray[4] &amp; diceArray[0]!=diceArray[5] &amp; diceArray[1]!=diceArray[2] &amp; diceArray[1]!=diceArray[3] &amp; diceArray[1]!=diceArray[4] &amp; diceArray[1]!=diceArray[5] &amp; diceArray[2]!=diceArray[3] &amp; diceArray[2]!=diceArray[4] &amp; diceArray[2]!=diceArray[5] &amp; diceArray[3]!=diceArray[4] &amp; diceArray[3]!=diceArray[5] &amp; diceArray[4]!=diceArray[5]))
  
                  {
                      System.out.println("stop babes");
                  }
                  else
                  {
                      System.out.print("Did not work");
                  }
  </code></pre>
  
  <p>There is more to this code but I know the rest works as when I print out each sequence they all pint out no problem. When I run the code with this part Ideally It would print out many sequences with duplicate number and with these print out "did not work" and one of the results should come out with "stop babes" (These will be removed later just using them to test and a return used to stop the code) However when i run the code this happens</p>
  
  <pre><code>how many rolls of 6 dice? 3
  LINE 1
   4 1 3 5 5 5
  stop babes
  LINE 2
   4 4 1 2 6 1
  stop babes
  LINE 3
   3 6 4 6 4 4
  stop babes
  </code></pre>
  
  <p>JUST a quick edit re on the if statement. I realise It could be shortened to a quick loop I just wanted to brute force the problem. 
  The main problem is the text "stop babes" should only be printing when a code such as 1 2 3 4 5 6 is printed informing me the code works and allowing me to insert a break statement on the main FOR loop.</p>