Remove specific string from arraylist elements containing a particular subsrtring

后端 未结 5 617
我寻月下人不归
我寻月下人不归 2021-01-24 15:00

Here is my code for arrayList ,

 String[] n = new String[]{\"google\",\"microsoft\",\"apple\"};
      final List list =  new ArrayList

        
5条回答
  •  北恋
    北恋 (楼主)
    2021-01-24 15:42

    From java 8 You can use

    list.removeIf(s -> s.contains("le"));
    

提交回复
热议问题