Remove specific string from arraylist elements containing a particular subsrtring
问题 Here is my code for arrayList , String[] n = new String[]{"google","microsoft","apple"}; final List<String> list = new ArrayList<String>(); Collections.addAll(list, n); how to remove all the elements that contains le from the above list. Is there any default method or by looping we have to remove manually.tell me how to do it.Thanks. 回答1: use the following code. import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; public class