Android examples for java.lang:array contain
Check if an array contains an int
//package com.java2s; public class Main { public static boolean contains(int[] arr, int value) { for (int i = 0; i < arr.length; i++) { if (arr[i] == value) { return true; }// w w w . jav a2 s . c o m } return false; } }