feat: complete all files

This commit is contained in:
2026-05-15 17:30:41 +03:30
parent 42f07c638d
commit 51cccccea4
9 changed files with 61 additions and 93 deletions
@@ -7,18 +7,16 @@ import java.util.List;
public class ReadFileExample02 {
static void main() {
try
{
Path path = Path.of("example.txt");
Path path = Path.of("quotes.txt");
try {
List<String> lines = Files.readAllLines(path);
for(String line: lines)
for(String line : lines)
{
System.out.println(line);
}
}
catch (IOException e)
{
System.err.println("Something went wrong");
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}