title: Method in another Class not returning anything
body: <p>I'm working on a project that creates a Hangman game. The GameManager Class should call the getRandomAnswer method from the AnswerBank Class, which should return a random answer of two nouns from a file called noun_noun.txt (I've placed this file in the first level of the project folder). However, whenever I try to test the code, the console produces nothing after typing "yes" when prompted. Can anyone help? </p>
  
  <pre><code>public class GameManager {
  private ArrayList&lt;String&gt; puzzleHistory;
  private int numPuzzlesSolved;
  private AnswerBank bank;
  public GameManager(String fn) throws IOException{
      numPuzzlesSolved = 0;
      puzzleHistory = new ArrayList&lt;String&gt;();
      this.bank = new AnswerBank(fn);
  }
  public static void main(String[] args) throws IOException {
      GameManager obj = new GameManager("noun_noun.txt");
      obj.run();
  }
  
  public void run() throws FileNotFoundException{
      Scanner scan = new Scanner(System.in);
      System.out.println("Would you like to play Hangman? Please type 'yes' or 'no'.");
      String inputAns = scan.next();
      if(inputAns.equalsIgnoreCase("no")){
          System.exit(0);
      }
      else if(inputAns.equalsIgnoreCase("yes")){
          System.out.println(bank.getRandomAnswer());
          }
      else{
          System.out.println("Invalid response!");
      }
      scan.close();
  }
  
  }
  public class AnswerBank {
  private ArrayList&lt;String&gt; listStrings;
  private File gameFile;
  public AnswerBank(String fileName) throws IOException{
      File gameFile = new File(fileName);
      this.gameFile = gameFile;
      this.listStrings = new ArrayList&lt;String&gt;();
  }
  public String getRandomAnswer() throws FileNotFoundException{
      Scanner fileScan = new Scanner(gameFile);   
      int totalLines = 0;
      while(fileScan.hasNextLine()){
          totalLines++;
      }
      for(int i = 0; i &lt; totalLines; i++){
          this.listStrings.add(fileScan.nextLine());
      }
      int randInt = (int)(Math.floor ( Math.random() * totalLines));
      String randAns = listStrings.get(randInt);
      fileScan.close();
  
      return randAns;
  }
  
  }
  </code></pre>
  
  <p>puzzleHistory and numPuzzlesSolved will be used later, so please ignore those. Thanks in advance for any help.</p>