title: Finding the Number of Primes between two numbers
body: <pre><code>    public static void main(String[] args) {
          int a = 0;
          System.out.println(System.currentTimeMillis());
          for(int x = 2; x &lt;=10000; x++) {
              boolean hasDivisor = false;
              for(int y = 2; y &lt; x; y++) {
                  if(x % y == 0) {
                      hasDivisor = true;
                  }   
              }
  
              if(!hasDivisor) {
                  System.out.println(a);
              }
  
          }
      }
  
  }
  </code></pre>
  
  <p>So that's my code, and I want to make it so that int a increases by one every time there is a prime, but I can't figure out where to put the <code>a++</code>. Do I have to add in more code?</p>