[text] fhcghkhfgsdh

Viewer

copydownloadembedprintName: fhcghkhfgsdh
  1.    List<String> letters = new ArrayList(Arrays.asList("D","B","A","C","F","G"));
  2.        Predicate<String> p1 = s -> s.compareTo("C") > 0;
  3.        Predicate<String> p2 = s -> s.equals("B");
  4.        letters.removeIf(p1.negate().or(p2));
  5.        letters.sort((s1,s2) -> s1.compareTo(s2));
  6.        System.out.println(letters);

Editor

You can edit this paste and save as new:


File Description
  • fhcghkhfgsdh
  • Paste Code
  • 23 Mar-2023
  • 323 Bytes
You can Share it: