@Override
        public void run() {
            int i = 1;
            while (i <= MAX) {
                if ( (amEven && (i % 2) == 0) || (!amEven && (i % 2) != 0) ) {
                    try {
                        writer.write(i);
                    }
                    catch (IOException ioe) {
                        ioe.printStackTrace();
                    }
                }
                ++i;
            }
        }