How to compare Integer with integer array

前端 未结 4 982
你的背包
你的背包 2021-01-07 04:47

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 wa

4条回答
  •  执笔经年
    2021-01-07 04:55

    for(i = 0; i < integerArray.length; i++ {
        if(singleinteger != integerArray[i] { 
            //some action
        }
        else { 
            break; //add this line
        }
    }
    

提交回复
热议问题