title: Character occurrence in a txt file java
body: <p>I'm writing a character occurrence counter in a txt file. I keep getting a result of 0 for my count when I run this:</p>
  
  <pre><code>  public double charPercent(String letter) {
  
          Scanner inputFile = new Scanner(theText);
  
          int charInText = 0;
          int count = 0;
  
          // counts all of the user identified character
          while(inputFile.hasNext()) {
  
              if (inputFile.next() == letter) {
                  count += count;
              }
  
          }
  
          return count;
      }
  </code></pre>
  
  <p>Anyone see where I am going wrong?</p>