check if a list contains a string java

Java
String search = "A";
for(String str: myList) {
    if(str.trim().contains(search))
       return true;
}
return false;
Source

Also in Java: