title: Error: int cannot be dereferenced
body: <p>I seem to be getting an "Error: int cannot be dereferenced" error when compiling. I've looked up reasons why this happens and despite that I'm not sure how I'm suppose to fix it.</p>
  
  <pre><code>public class NetID_BaseballPitcher
  {
      Scanner in = new Scanner(System.in);
      private final int maxgames = 20;
      private int[] gamesPitched = new int[maxgames];
      private int count, totalRuns;
      private float totalInnings;
  
      public int inputGameData()
      {
          for(int i = 0; i &lt; count; i++)
          {
              gamesPitched[i] = new NetID_BaseballGame();
              gamesPitched[i].inputGame();
          }
      }  
  }
  </code></pre>
  
  <p>And here is Baseballgame.java</p>
  
  <pre><code>public class NetID_BaseballGame
  {
      private static int runs;
      private static int gameNum;
      private static float innings;
      public static void inputGame()
      {
          do
          {
              System.out.print("Game # ");
              gameNum = in.nextInt();
          } while( gameNum &lt; 0 );
          do
          {
              System.out.print("Number Innings");
              innings = in.nextInt();
          } while( ( innings &lt; 0 ) &amp;&amp; ( innings &gt; 10 ) );
  
          do
          {
              System.out.print("Number Runs");
              runs = in.nextInt();
          } while( runs &lt; 0 );
      }
  }
  </code></pre>
  
  <p>While compiling BaseballPitcher.java, I get this:</p>
  
  <pre><code>NetID_BaseballPitcher.java:45: error: incompatible types
              gamesPitched[i] = new NetID_BaseballGame();
                            ^
    required: int
    found:    NetID_BaseballGame
  NetID_BaseballPitcher.java:46: error: int cannot be dereferenced
          gamesPitched[i].inputGame();
  </code></pre>
  
  <p>I'm assuming that I'm missing something completely obvious, and I'm just spinning where I'm at. Any help would be greatly appreciated!</p>