title: Sieve of erastothenes primality issue
body: <p>Set up to print out all false values which are prime numbers however out of 25 it prints. 3, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, not sure why some of them slip by. Any insight into the matter would be nice. </p>
  
  <p>Or simply pointing me in the write direction. 
  Why are the non-prime numbers such as 8 being printed?</p>
  
  <pre><code>import java.util.Arrays;
  import java.util.Scanner;
  class Sieve {
        public static void main(String args[]) {
                Scanner inputScanner;
                inputScanner = new Scanner(System.in);
                //determine max value
                System.out.println("I will determine all the primality of a set of numbers, enter the max");
                int n = Integer.parseInt (inputScanner.nextLine());
                boolean[] truedBooleanArray = calcBooleanMax (n);
                //call upon function to check primality
                boolean [] primeNumbers = calcPrimality (truedBooleanArray);
                // call upon function to print out prime numbers
                printPrimes(primeNumbers);
        }
  
        public static boolean[] calcBooleanMax(int maxNumber) {
                boolean [] maxNumberArray = new boolean [maxNumber];
                maxNumberArray[0] = false;
                maxNumberArray[1] = false;
                //asigns  1, 0 to false
                //change all boleans within array from false to true!
                for(int i=1; i &lt; maxNumber; i++) {
                        maxNumberArray [i] = true;
                }
                return maxNumberArray;
        }
  
        public static boolean[] calcPrimality(boolean [] truedBooleans) {
                for(int i = 2; i &lt;=truedBooleans.length; i++) {
                        //check every number greater than 1 for primality.
                        if (truedBooleans[i-1]) {
  
                        }
                        //finds multiples and makes sure they arent stored
                        for(int j = 2*i; j &lt;= truedBooleans.length; j+= i) {
                                truedBooleans[j-1] = false;
                        }
                } 
                return truedBooleans;
        }
  
        public static void printPrimes(boolean [] thePrimeNumbers){
                System.out.println("The prime numbers are [");
                for(int i = 2; i&lt;thePrimeNumbers.length; i++) {
                        if(thePrimeNumbers[i] == false ) {
                                System.out.print(i + ", ");
                        }
                }
        }
  }
  </code></pre>