StringBuilder contentBuilder = new StringBuilder();
try (Stream<String> stream = Files.lines(Paths.get("test.txt"), StandardCharsets.UTF_8)) {
Β Β stream.forEach(s -> contentBuilder.append(s).append("\n"));
}
System.out.println(contentBuilder);
StringBuilder contentBuilder = new StringBuilder();
try (Stream<String> stream = Files.lines(Paths.get("test.txt"), StandardCharsets.UTF_8)) {
Β Β stream.forEach(s -> contentBuilder.append(s).append("\n"));
}
System.out.println(contentBuilder);
Comments
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π