arraylist contain a value in java code example
Example 1: java check if key exists in list
if (lista.contains(conta1)) {
System.out.println("Account found");
} else {
System.out.println("Account not found");
}
Example 2: java arraylist contains string
boolean ans = arr.contains("geeks");