Answers for "check if a list contains a string java"

1

check if a list contains a string java

String search = "A";
for(String str: myList) {
    if(str.trim().contains(search))
       return true;
}
return false;
Posted by: Guest on June-24-2020

Code answers related to "check if a list contains a string java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language