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
@@ -6,22 +6,17 @@ import java.util.Scanner;
public class ReadFileExample01 {
static void main() {
try
{
File file = new File("example.txt");
File file = new File("quotes.txt");
try {
Scanner reader = new Scanner(file);
while(reader.hasNextLine())
while(reader.hasNext())
{
String line = reader.nextLine();
System.out.println(line);
}
reader.close();
}
catch (FileNotFoundException e)
{
throw new RuntimeException(e);
}
} catch (FileNotFoundException e) {
}
}
}