The contains() method can be used to check if
a Java ArrayList contains a given item or not
if (lista.contains(conta1)) {
System.out.println("Account found");
} else {
System.out.println("Account not found");
}
String search = "A";
for(String str: myList) {
if(str.trim().contains(search))
return true;
}
return false;