title: How to compare Integer with integer array
body: <p>i am new to android. I want to know how to compare Integer with integer array. There is a set of integer array (Ex) array_int={1,2,3,4} and single integer int i=2, here i want to compare both integers,and in case if single integer appears in array integer, i want to break the process.   </p>
  
  <pre><code>for(i=0;i&lt;integerArray.length;i++){
      if(singleinteger!=integerArray[i]){ // some action       }
  else{
  // Stop the action  }
  </code></pre>
  
  <p>In this case it compares both integer. and at the time when two integers are equal process getting break, otherwise it iteration action  till the loop getting end. </p>