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.
for(i=0;i<integerArray.length;i++){
if(singleinteger!=integerArray[i]){ // some action }
else{
// Stop the action }
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.