Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String str[]={"ID : 122",
- "Сумма 400.00 RUB",
- "Дата создания: 09.03.2019",
- "ID : 12287",
- "Сумма 1000.00 RUB",
- "Дата создания: 09.03.2019"};
- //System.out.println(IntStream.range(1,100).distinct().count());
- List<String> testList = Arrays.asList(str).stream()
- .filter(s -> s.startsWith("ID") | s.startsWith("Дата"))
- .collect(Collectors.toList());
- testList.forEach(System.out::println);
- ID : 122
- Дата создания: 09.03.2019
- ID : 12287
- Дата создания: 09.03.2019
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement