title: Java Counter not counting
body: <p>I am stuck on a problem in having my counter increment.  I'm not sure what I am doing wrong though. Sorry if this is a beginner mistake, but I have not found a solution where I understand or helps yet.</p>
  
  <pre><code>  public static int duplicates(String[] text, int numWords){
              int currentCount = 1;
              for (int i=0; i&lt;numWords-1; i++){
                  for (int j=i+1; j&lt;numWords; j++){
                      if (text[i] == text[j]){
                          currentCount++;
  
                      }
                  }   
              }
  
              return currentCount;
          }
  </code></pre>