Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. String str[]={"ID : 122",
  2. "Сумма 400.00 RUB",
  3. "Дата создания: 09.03.2019",
  4. "ID : 12287",
  5. "Сумма 1000.00 RUB",
  6. "Дата создания: 09.03.2019"};
  7. //System.out.println(IntStream.range(1,100).distinct().count());
  8. List<String> testList = Arrays.asList(str).stream()
  9. .filter(s -> s.startsWith("ID") | s.startsWith("Дата"))
  10. .collect(Collectors.toList());
  11. testList.forEach(System.out::println);
  12.  
  13. ID : 122
  14. Дата создания: 09.03.2019
  15. ID : 12287
  16. Дата создания: 09.03.2019
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement