package org.xander.katas;

import java.util.Arrays;

public class OddEvenPrime {
    static final int range = 10000;
    static boolean[] sieveOfEratosthenes = new boolean[range];

    static {
        Arrays.fill(sieveOfEratosthenes, true);
        sieveOfEratosthenes[0] = sieveOfEratosthenes[1] = false;

        for (int i = 2; i < Math.sqrt(sieveOfEratosthenes.length); i++) {
            for (int j = 2; i * j < sieveOfEratosthenes.length; j++) {
                if (sieveOfEratosthenes[i * j]) {
                    sieveOfEratosthenes[i * j] = false;
                }
            }
        }
//        printResultsForTest();
    }

    public String calculate(int number) {
        return (sieveOfEratosthenes[number]) ? number + " is prime"
                : (number % 2 == 0) ? "even"
                : "odd";
    }

    private static void printResultsForTest() {
        int primeCounter = 0;
        System.out.print("{");
        for (int a = 0; a < sieveOfEratosthenes.length; a++) {
            if (sieveOfEratosthenes[a]) {
                primeCounter++;
                System.out.print(a + ", ");
            }
        }
        System.out.print("}");

        System.out.println("\n\nThere are " + primeCounter + " prime numbers in the range from \'0\' to \'" + range + "\'");
    }
}
@@ -817,24 +817,26 @@
 dd%22;%0A    %7D%0A%0A
+//
     private 
@@ -867,24 +867,26 @@
 ForTest() %7B%0A
+//
         int 
@@ -903,16 +903,18 @@
 er = 0;%0A
+//
         
@@ -932,24 +932,26 @@
 print(%22%7B%22);%0A
+//
         for 
@@ -997,24 +997,26 @@
 gth; a++) %7B%0A
+//
             
@@ -1041,24 +1041,26 @@
 henes%5Ba%5D) %7B%0A
+//
             
@@ -1079,16 +1079,18 @@
 nter++;%0A
+//
         
@@ -1125,17 +1125,18 @@
  %22, %22);%0A
- 
+//
         
@@ -1132,32 +1132,34 @@
 %0A//           %7D%0A
+//
         %7D%0A      
@@ -1144,32 +1144,34 @@
   %7D%0A//        %7D%0A
+//
         System.o
@@ -1185,18 +1185,21 @@
 t(%22%7D%22);%0A
-%0A 
+//%0A//
        S
@@ -1318,11 +1318,14 @@
 %22);%0A
+//
     %7D%0A%7D
+%0A

Update OddEvenPrime.java