public void run() {
        if (ItemCount > 0) {
            for (int i = 0; i < ItemCount; i++) {
                try {
                    stack.push(temp.get(i));
                } catch (InterruptedException ex) {
                    Logger.getLogger(TestingThread.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        } else {
            try {
                System.out.println("Thread " + ThreadID.get() + " : " + stack.pop().toString());
            } catch (EmptyException ex) {
                Logger.getLogger(TestingThread.class.getName()).log(Level.SEVERE, null, ex);
            } catch (InterruptedException ex) {
                Logger.getLogger(TestingThread.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }