8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bc9a32 commit 993bcbeCopy full SHA for 993bcbe
src/main/java/IO_example/JavaFileIOExample.java
@@ -12,14 +12,13 @@ public class JavaFileIOExample {
12
13
public static void main(String... args) throws IOException {
14
System.out.println("Program started.");
15
- readFileOnDisk();
+ readFileOnDisk("src/test/resources/sample_input.txt");
16
findUniqueCityNames();
17
System.out.println("Program finished.");
18
}
19
20
- public static void readFileOnDisk() throws IOException {
21
- String file = "src/test/resources/sample_input.txt";
22
- Scanner scanner = new Scanner(new File(file));
+ public static void readFileOnDisk(String filePath) throws IOException {
+ Scanner scanner = new Scanner(new File(filePath));
23
scanner.useDelimiter(" ");
24
25
assertTrue(scanner.hasNext());
0 commit comments