title: Getting "The method is undefined for the type String"
body: <p>I am a newbie following the book 'Head First Java', and following one of the projects in the book. I ran into an error on the last line of the main method - "The method checkYourself(String) is undefined for the type String"</p>
  
  <pre><code>class dotcom{
      int [] Locationcells;
      int hits = 0;
  
  public String checkYourself(String guess){
      int guess1 = Integer.parseInt(guess);
      String result = "miss";
  
      for(int cell : Locationcells){
          if(guess1 == cell){
              result = "hit";
              hits = hits + 1;
              break;
          }
      }
      if (hits == Locationcells.length){
          result = "kill";
  
  
  
      }
      System.out.println(result);
      return result;
  
  
  }
  public void setCellLocations(int []locs){
      Locationcells = locs;
  
  }
  }
  
  
  
  
  public class SimpleDotComGame {
      public static void main(String[] args) {
          dotcom dotMan = new dotcom();
          int locations [] = {3,4,5};
          dotMan.setCellLocations(locations);
  
  
          String userguess = "2";
          String result = userguess.checkYourself(userguess);
  
  
  
  }
  }
  </code></pre>