coding main file.

This commit is contained in:
2026-05-14 15:52:28 +03:30
parent e11db0275d
commit 5a8e0b304a
+3 -3
View File
@@ -8,7 +8,7 @@ public class Main {
try { try {
// Instantiate the parser // Instantiate the parser
Parser parser = new Parser(filePath); Parser parser = new Parser(filePath);
// TODO: You can test your code here before you run the unit tests. // TODO: You can test your code here before you run the unit tests.
// Example: Call your sorting methods, iterate through the returned list, // Example: Call your sorting methods, iterate through the returned list,
// and print out the movies to see if they match the expected results in the Help folder. // and print out the movies to see if they match the expected results in the Help folder.
@@ -26,9 +26,9 @@ public class Main {
for (Movie movie : parser.sortByYear()) { for (Movie movie : parser.sortByYear()) {
System.out.println(movie); System.out.println(movie);
} }
System.out.println("Movies parsed successfully! Total movies: " + parser.sortByTitle().size()); System.out.println("Movies parsed successfully! Total movies: " + parser.sortByTitle().size());
} catch (IOException e) { } catch (IOException e) {
System.err.println("Error reading or parsing the HTML file: " + e.getMessage()); System.err.println("Error reading or parsing the HTML file: " + e.getMessage());
} }