title: check to see if 3 values in array are consecutive?
body: <p>I have an array, which for example contains the values 123456, which obviously contains more than 3 consecutive values.</p>
  
  <p>I want a method that will return true if the array contains at least 3 consecutive values in it, thanks in advance.</p>
  
  <p>for example:</p>
  
  <p>972834 - return true (234)</p>
  
  <p>192645 - return true (456)</p>
  
  <p>etc. etc..</p>
  
  <p>update! :</p>
  
  <p>i have an array in java, it takes in 6 integers.
  for example nextTurn[], and it contains 8 4 2 5 6 5
  at the moment it sorts the array - 2 4 5 5 6 8</p>
  
  <p>how would i get it to return true if there are 3 consecutive numbers throughout the array?</p>
  
  <p>ie so it will find 4 5 6</p>
  
  <p>i would also like it to return the position of the integer in the array,
  so for the original array 8 4 2 5 6 5</p>
  
  <p>it will return, 2 4 5
  or 2 5 6</p>
  
  <p>thanks for all your help guys, appreciated</p>