Where's your main method?
Also, we have recommended that you not hard-code your file String as you are doing here:
|
Code:
|
public void load(String pirateTxt) throws IOException {
// below, you use hard-coded String "pirate.txt" instead of using pirateTxt parameter??
Scanner infile = new Scanner(new InputStreamReader(new FileInputStream("pirate.txt"))); |
Why have you not fixed this yet?