Use the String .contains method instead.