Iterate through the list and check if contains your string "How" and if it does then remove. You can use following code:
// need to construct a new ArrayList otherwise remove operation will not be supported
List<String> list = new ArrayList<String>(Arrays.asList(new String[]
{"How are you?", "How you doing?","Joe", "Mike"}));
System.out.println("List Before: " + list);
for (Iterator<String> it=list.iterator(); it.hasNext();) {
if (!it.next().contains("How"))
it.remove(); // NOTE: Iterator's remove method, not ArrayList's, is used.
}
System.out.println("List After: " + list);
OUTPUT:
List Before: [How are you?, How you doing?, Joe, Mike]
List After: [How are you?, How you doing?]