mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
- set language level explicitly GitOrigin-RevId: 01b844c4f0d812c4505491121429af3cc7df24c5
13 lines
440 B
Java
13 lines
440 B
Java
|
|
public static void main(String[] args) throws IOException {
|
|
List<String> strings = readNonEmptyLines();
|
|
strings.forEach(System.out::println);
|
|
}
|
|
|
|
private static List<String> readNonEmptyLines() throws IOException {
|
|
try (BufferedReader reader = new BufferedReader(new FileReader("somePath"))) {
|
|
<caret>
|
|
return reader.lines().filter(l -> !l.isBlank()).filter(l -> !l.startsWith("a")).filter(l -> l.length() > 3).toList();
|
|
}
|
|
}
|