@Override
        public void run() {
            int rand = ThreadLocalRandom.current().nextInt(1000000);
            if(index == 999){
                rand = -1;
            }
            if(index == 1001){
                rand = 1000001;
            }
            mmKeeper.updateMinMax(rand);
        }
Threadsafe way of updating min and max
@param value
src/com/interview/multithreaded/MinMaxKeeper.java